Change float8-to-int8 conversion to round to nearest, rather than
Tom Lane <tgl@sss.pgh.pa.us>
Change float8-to-int8 conversion to round to nearest, rather than truncating to integer. Remove regress test that checks whether 4567890123456789 can be converted to float without loss; since that's 52 bits, it's on the hairy edge of failing with IEEE float8s, and indeed rint seems to give platform-dependent results for it.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/int8.c | modified | +11 −11 |
| src/test/regress/expected/int8-exp-three-digits.out | modified | +0 −10 |
| src/test/regress/expected/int8.out | modified | +0 −10 |
| src/test/regress/sql/int8.sql | modified | +0 −1 |