Re: [BUGS] BUG #4660: float functions return -0 - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: [BUGS] BUG #4660: float functions return -0
Date
Msg-id 37ed240d0902171124x2cbebd9dq9af320083dcb7e34@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #4660: float functions return -0  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #4660: float functions return -0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Feb 18, 2009 at 2:57 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The point I'm trying to make is that we should deliver IEEE-compliant
> results if we are on a platform that complies with the spec.  Right down
> to the minus sign.  If that surprises people who are unfamiliar with the
> spec, well, there are a lot of things about floating point arithmetic
> that surprise people who aren't familiar with it.

Agreed.  There are plenty of things about floats that are downright
wonky, and when people start seeing minus zero in their float
computations it might prompt them into doing some reading, and
figuring out that what they really wanted was numeric.

(not saying that floats are without application, but I've often
encountered them in places they ought not to be)

Cheers,
BJ


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: [GENERAL] Good Delimiter for copy command
Next
From: Teodor Sigaev
Date:
Subject: GIN fast insert