Re: [BUGS] BUG #14695: Documentation is not accurate - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14695: Documentation is not accurate
Date
Msg-id 25149.1497016880@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] BUG #14695: Documentation is not accurate  (yarex@pobox.sk)
List 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 by date:

Previous
From: Cocco Gianfranco
Date:
Subject: [BUGS] Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64
Next
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14695: Documentation is not accurate