From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "yarex(at)pobox(dot)sk" <yarex(at)pobox(dot)sk> |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14695: Documentation is not accurate |
Date: | 2017-06-09 15:02:37 |
Message-ID: | CAKFQuwaEVfHvH19E0ujgcWkNgCVyHNX8JyE011032WHvOe_JLw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thursday, June 8, 2017, <yarex(at)pobox(dot)sk> wrote:
>
>
> 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
>
> ..... well, minus 42 is not smallest integer from -42.8, because -42 is
> bigger number :-).
..... so correct number should be -43 in case of negative numbers
> (positive are fine)
>
>
The key phase is "integer not less than argument" and -43 < -42 and so
cannot be a valid answer.
Like Tom said:
The integers from -41 to positive infinity are the set of potential answers
per the noted phrase. You pick the smallest of them which is -41.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | rodolphe | 2017-06-09 15:11:58 | BUG #14697: Data architect and free software evangelist |
Previous Message | Tom Lane | 2017-06-09 14:01:20 | Re: BUG #14695: Documentation is not accurate |