Remove the special cases to prevent minus-zero results in float4 and float8
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Feb 2009 19:23:26 +0000 (19:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Feb 2009 19:23:26 +0000 (19:23 +0000)
commit376a6ac43f9e424d1d47033094e862a0593ccab6
treec5b7ab23301673bc94ca4db82ba23ee540af05c9
parentf0a1f00f8165cdaa1ba33cdf619eba5e4fd7723c
Remove the special cases to prevent minus-zero results in float4 and float8
unary minus operators.  We weren't attempting to prevent minus zero anywhere
else; in view of our gradual trend to make the float datatypes more IEEE
standard compliant, we should allow minus zero here rather than disallow it
elsewhere.

We don't, however, expect that all platforms will produce minus zero, so
we need to adjust the one affected regression test to allow both results.

Per discussion of bug #4660.

(In passing, clean up a couple other minor infelicities in float.c.)
src/backend/utils/adt/float.c
src/test/regress/expected/numerology.out
src/test/regress/expected/numerology_1.out [new file with mode: 0644]