Rounding strategy of the 'round' function

Поиск
Список
Период
Сортировка
От Rudolph Froger
Тема Rounding strategy of the 'round' function
Дата
Msg-id 84366276-5142-da72-b5c3-0b3bab186ff5@dreamsolution.nl
обсуждение исходный текст
Список pgsql-docs
Hi,

The 'round' mathematical function documentation doesn't specify its 
rounding strategy. If this would be documented then users can rely on 
its rounding behavior. For double precision the rounding probably 
depends on your platform. For numeric the function seems to round to 
nearest with ties going away from zero (sometimes referred to as "round 
half up). 6.5 -> 7.0 and -6.5 -> -7.0.

https://www.postgresql.org/docs/current/functions-math.html

Kind regards, Rudolph



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: "there is no way to insert less than one row"
Следующее
От: PG Doc comments form
Дата:
Сообщение: PL/Tcl - examples not working