Re: unsafe floats - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: unsafe floats
Date
Msg-id Pine.LNX.4.44.0403110717390.13979-100000@zigo.dhs.org
Whole thread Raw
In response to Re: unsafe floats  (Neil Conway <neilc@samurai.com>)
Responses Re: unsafe floats  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 11 Mar 2004, Neil Conway wrote:

> So, what is the correct behavior: if you multiply two values and get a
> result that exceeds the range of a float8, should you get
> 'Infinity'/'-Infinity', or an overflow error?

That's the issue and I think we should allow infinity as a result of a 
float operation (like you got in the example). It's part of IEEE 754 
math, so not getting Infinity as a result would break that. If someone 
does not want infinity stored in a column he/she could add a constraint to 
disallow it.

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Re: grants
Next
From: Dennis Bjorklund
Date:
Subject: Re: unsafe floats