Float/Double cast to int

Поиск
Список
Период
Сортировка
От Feng Tian
Тема Float/Double cast to int
Дата
Msg-id CAFWGqns6Ko_amJYq8Sc=bnv20oNAru7M0R3PZbN_KihG4OJRUw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Float/Double cast to int
Список pgsql-hackers
Hi, Hackers,

Here is a query, server was built witch GCC on Linux, AMD64.


ftian=#
ftian=# select 1.5::int, 1.5::double precision::int, 314.5::int, 314.5::double precision::int;
 int4 | int4 | int4 | int4
------+------+------+------
    2 |    2 |  315 |  314
(1 row)


I believe this is because rint is broken -- can some expert on IEEE754 please help confirm that this is a bug?

Thanks,
Feng

В списке pgsql-hackers по дате отправления: