Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Дата
Msg-id CA+Tgmoa1xyXQrgEcXeCEmg3ZonC-oaUNn8OzEnhSXpD=BKYtGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Следующее
От: Tom Lane
Дата:
Сообщение: SP-GiST versus index-only scans