From: | Roman Kononov <kononov195-pgsql(at)yahoo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [BUGS] BUG #2846: inconsistent and confusing handling |
Date: | 2006-12-27 23:47:05 |
Message-ID: | 459305F9.1060403@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On 12/27/2006 05:19 PM, Tom Lane wrote:
> Roman Kononov <kononov195-pgsql(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2006-12-28 00:11:55 | Re: (SETOF) RECORD AS complex_type |
Previous Message | David Fetter | 2006-12-27 23:40:58 | Re: (SETOF) RECORD AS complex_type |
From | Date | Subject | |
---|---|---|---|
Next Message | ITAGAKI Takahiro | 2006-12-28 01:11:52 | Re: Load distributed checkpoint |
Previous Message | Tom Lane | 2006-12-27 23:26:47 | Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows, |