From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Bug fix for glibc broke freebsd build in REL_11_STABLE |
Date: | 2018-09-04 22:10:12 |
Message-ID: | 875zzkvrvh.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> The reason it behaves oddly is this: on i387 FPU (and NOT on arm32
>> or on 32-bit i386 with a modern architecture specified to the
>> compiler), the result of 1e200 * 1e180 is not in fact infinite,
>> because it fits in an 80-bit long double. So __builtin_isinf reports
>> that it is finite; but if it gets stored to memory as a double (e.g.
>> to pass as a parameter to a function), it then becomes infinite.
Tom> Ah-hah. Can we fix it by explicitly casting the argument of isinf
Tom> to double?
No; the generated code doesn't change. Presumably the compiler regards
the value as already being of type "double", just one that happens to be
stored in a longer register.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-09-04 22:16:27 | Re: Bug fix for glibc broke freebsd build in REL_11_STABLE |
Previous Message | Jimmy Yih | 2018-09-04 22:09:21 | Prevent concurrent DROP SCHEMA when certain objects are being initially created in the namespace |