Re: [BUGS] BUG #4660: float functions return -0

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [BUGS] BUG #4660: float functions return -0
Дата
Msg-id 37ed240d0902171124x2cbebd9dq9af320083dcb7e34@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #4660: float functions return -0  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] BUG #4660: float functions return -0
Список 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 по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [GENERAL] Good Delimiter for copy command
Следующее
От: Teodor Sigaev
Дата:
Сообщение: GIN fast insert