Unexpected result using floor() function

Поиск
Список
Период
Сортировка
От Frank Millman
Тема Unexpected result using floor() function
Дата
Msg-id 2A49534B02644348A76354FC0A95A2AB@FrankLaptop
обсуждение
Ответы Re: Unexpected result using floor() function
Re: Unexpected result using floor() function
Re: Unexpected result using floor() function
Список pgsql-general
Hi all
 
I am running PostgreSQL 9.4.4 on Fedora 22.
 
SELECT floor(4.725 * 100 + 0.5) returns 473, which is what I expected.
 
SELECT floor(4.725 * power(10, 2) + 0.5) returns 472, which I find surprising.
 
Please can someone explain the anomaly.
 
Thanks
 
Frank Millman
 

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