Re: [BUGS] BUG #14695: Documentation is not accurate

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #14695: Documentation is not accurate
Дата
Msg-id 25149.1497016880@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [BUGS] BUG #14695: Documentation is not accurate  (yarex@pobox.sk)
Список pgsql-bugs
yarex@pobox.sk writes:
> url: https://www.postgresql.org/docs/8.1/static/functions-math.html

> CEIL and FLOOR example is not accurate.

> ceil(dp or numeric) 
> smallest integer not less than argument: ceil(-42.8) = -42

That example is just fine: it describes both the actual behavior
of the software, and the desired behavior.  ceil() is effectively
"round towards plus infinity".  You seem to be expecting "round
away from zero", but that's not how it's defined.  For comparison,
the Linux man page for the C ceil() function says
      For example, ceil(0.5) is 1.0, and ceil(-0.5) is 0.0.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Cocco Gianfranco
Дата:
Сообщение: [BUGS] Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [BUGS] BUG #14695: Documentation is not accurate