pgsql: Remove the special cases to prevent minus-zero results in float4

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove the special cases to prevent minus-zero results in float4
Date: 2009-02-18 19:23:26
Message-ID: 20090218192326.964247559ED@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
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.)

Modified Files:
--------------
pgsql/src/backend/utils/adt:
float.c (r1.159 -> r1.160)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/float.c?r1=1.159&r2=1.160)
pgsql/src/test/regress/expected:
numerology.out (r1.5 -> r1.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/numerology.out?r1=1.5&r2=1.6)

Added Files:
-----------
pgsql/src/test/regress/expected:
numerology_1.out (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/numerology_1.out?rev=1.1&content-type=text/x-cvsweb-markup)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-02-18 19:27:49 Re: [COMMITTERS] pgsql: Remove the special cases to prevent minus-zero results in float4
Previous Message User Bmomjian 2009-02-18 18:00:55 pg-migrator - src: Issue suggestion about updating oid in new server.

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-02-18 19:27:49 Re: [COMMITTERS] pgsql: Remove the special cases to prevent minus-zero results in float4
Previous Message Tom Lane 2009-02-18 18:41:34 Re: pg_restore new option -m