Re: unsafe floats

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: unsafe floats
Дата
Msg-id Pine.LNX.4.44.0403110717390.13979-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: unsafe floats  (Neil Conway <neilc@samurai.com>)
Ответы Re: unsafe floats  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: grants
Следующее
От: Dennis Bjorklund
Дата:
Сообщение: Re: unsafe floats