Re: ceil/ceiling/floor mathematical functions documented output is incorrect

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ceil/ceiling/floor mathematical functions documented output is incorrect
Дата
Msg-id 12683.1586013290@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ceil/ceiling/floor mathematical functions documented output is incorrect  (PG Doc comments form <noreply@postgresql.org>)
Список pgsql-docs
PG Doc comments form <noreply@postgresql.org> writes:
> The ceil, ceiling, and floor mathematical functions in documentation
> versions 9.5 through 12, and probably others is not correct.  The example
> output shows the ceil* functions returning the integer below the float value
> while the floor function shows the opposite.  Thanks!

No, they're correct as they stand.  These examples intentionally use
negative numbers to make the point that the rounding is towards or
away from plus-infinity, not towards or away from zero.

If we had room for more than one example, I'd be inclined to make these
cases be secondary examples rather than the only one.  There's some work
afoot to restructure this chapter's function tables in a way that would
make that a bit less painful vertical-space-wise, so maybe it'll get
done soon.

            regards, tom lane



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

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: ceil/ceiling/floor mathematical functions documented output is incorrect
Следующее
От: Bryn Llewellyn
Дата:
Сообщение: Re: Proposal to improve the content in subsection 8.16.6. "CompositeType Input and Output Syntax"