Re: unsafe floats - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: unsafe floats
Date
Msg-id Pine.LNX.4.44.0403110724240.13979-100000@zigo.dhs.org
Whole thread Raw
In response to Re: unsafe floats  (Neil Conway <neilc@samurai.com>)
Responses Re: unsafe floats  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Thu, 11 Mar 2004, Neil Conway wrote:

> Fair enough. Attached is a patch that implements this. I chose to
> remove UNSAFE_FLOATS: if anyone thinks that is worth keeping, speak up
> now.

I have one question about the use of HUGE_VAL in postgresql. I got the
impression that the whole thing was designed to work on computers and
compilers where there is no infinity value, and then HUGE_VAL is defined
as the biggest number and treated as a special value.

If that is the case then using isinf() would not work (unless we have our
own). Well, maybe it's not an issue at all. Everything is IEEE 754 anyway
today.

A more important question is if we should give errors or produce Infinity
and NaN on mathematical operations. That is, should operations like
sqrt(-1.0) produce NaN or give an error.

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: unsafe floats
Next
From: Tom Lane
Date:
Subject: Re: PANIC on start