Re: unsafe floats

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unsafe floats
Date: 2004-03-11 06:20:00
Message-ID: Pine.LNX.4.44.0403110717390.13979-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2004-03-11 06:47:50 Re: unsafe floats
Previous Message Kris Jurka 2004-03-11 06:13:28 Re: grants