Re: [BUGS] BUG #2846: inconsistent and confusing handling

Поиск
Список
Период
Сортировка
От Roman Kononov
Тема Re: [BUGS] BUG #2846: inconsistent and confusing handling
Дата
Msg-id 459305F9.1060403@yahoo.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] BUG #2846: inconsistent and confusing  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-patches
On 12/27/2006 05:19 PM, Tom Lane wrote:
> Roman Kononov <kononov195-pgsql@yahoo.com> writes:
>> On 12/27/2006 03:23 PM, Bruce Momjian wrote:
>>> Are you sure?  As I remember, computation automatically upgrades to
>>> 'double'.  See this program and output:
>
>> This is platform- and compiler- dependent:
>
> ... and probably irrelevant, too.  We should store the result into a
> float4 variable and then test for isinf() on that; that eliminates the
> question of whether the compiler did the multiply in a wider format or
> not.

You are right provided that you want to ignore underflows and silently
produce zeros instead.

If you go this way, I recommend to ignore overflows as well, and silently
produce infinities and NaNs.

Roman

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] BUG #2846: inconsistent and confusing