Lists: | pgsql-committerspgsql-hackers |
---|
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 |
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)
From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)postgresql(dot)org> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Remove the special cases to prevent minus-zero results in float4 |
Date: | 2009-02-18 19:27:49 |
Message-ID: | 499C6135.3050500@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane wrote:
> 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.
Do we know if and what platforms wouldn't produce minus zero? It would
be interesting to not have the alternative expected output for a few
days and see which buildfarm animals break.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Remove the special cases to prevent minus-zero results in float4 |
Date: | 2009-02-18 19:54:26 |
Message-ID: | 12521.1234986866@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> 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.
> Do we know if and what platforms wouldn't produce minus zero? It would
> be interesting to not have the alternative expected output for a few
> days and see which buildfarm animals break.
Well, my old HPUX box definitely doesn't print minus zeroes here.
What I'm really more interested in is whether there are any third
or fourth opinions among the buildfarm members ...
regards, tom lane