The standard says:
"<ceiling function> computes the least integer greater than or equal to
its argument."
a) In my opinion this wording is easier to understand because it avoids
the negation via "not less".
b) To dispel the ambiguities concerning what is greater or lesser (with
negative numbers) we may add a second example with +42.8 and an
additional comment - something like: "Please consider the situation with
negative numbers: -42 is greater than -43".
Jürgen Purtz
On 07.06.2016 05:06, Tom Lane wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> On Mon, Jun 6, 2016 at 2:40 PM, <npistud@gmail.com> wrote:
>>> Please, check ceil, ceiling and floor functions. Example is correct, but
>>> description is wrong.
>> We could make things indeed more precise. Say for ceil, we use
>> "smallest *following* integer", and for floor, "largest *previous*
>> integer", and we keep the mention to "not less/greater than argument"
>> to show the fact that a numeric already rounded to an integer is equal
>> to itself. See the patch attached.
> Meh --- I'm not sure that adding previous/following really adds much
> clarity. Either with the existing wording or with yours, the statement
> is correct as long as you read "smaller" as "closer to minus infinity",
> a/k/a "further left on the number line". But if you are thinking it
> means "closer to zero", which is what I think the OP is thinking, this
> won't do much to disabuse you of your confusion.
>
> We had a similar complaint not long ago, so it does seem that the
> wording could stand to be clarified. But I doubt this way fixes it.
> Not sure how to do better ...
>
> regards, tom lane
>
>