Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Date
Msg-id CA+Tgmoa1xyXQrgEcXeCEmg3ZonC-oaUNn8OzEnhSXpD=BKYtGA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Dec 14, 2011 at 12:36 PM, Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Next
From: Tom Lane
Date:
Subject: SP-GiST versus index-only scans