From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Mark Cave-Ayland <mark(dot)cave-ayland(at)siriusit(dot)co(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64 |
Date: | 2011-12-14 17:59:53 |
Message-ID: | CA+Tgmoa1xyXQrgEcXeCEmg3ZonC-oaUNn8OzEnhSXpD=BKYtGA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 14, 2011 at 12:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> AFAICS it's really impractical to do that. The code Andrew is having
> problems with is essentially
>
> double a,b,c;
> ...
> a = b * c;
> if (isinf(a)) throw error;
>
> and the problem is that the multiplication result overflows in double
> precision, but not in the wider-than-double register precision.
> Therefore, if a is in a register and the isinf() primitive inspects the
> register, it will return false, even though when the value gets stored
> to memory it will become an infinity.
Uh, wow. That really is pretty insane. How is anyone supposed to
write sensible code around that non-API?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-12-14 18:00:44 | SP-GiST versus index-only scans |
Previous Message | Simon Riggs | 2011-12-14 17:52:36 | Re: Race condition in HEAD, possibly due to PGPROC splitup |