On Mon, Jun 6, 2016 at 2:40 PM, <npis...@gmail.com> wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/9.5/static/functions-math.html > Description: > > https://www.postgresql.org/docs/9.5/static/functions-math.html > > Same issue for other versions. > Please, check ceil, ceiling and floor functions. Example is correct, but > description is wrong. > > For ceil in docs > Description: smallest integer not less than argument. > Example: ceil(-42.8) = -42 > > But -42.8 < -42 > So, description should be "Biggest integer". > > Vice versa for floor.
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. -- Michael
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index ff7545d..980f1c4 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -702,7 +702,7 @@ <literal><function>ceil(<type>dp</type> or <type>numeric</type>)</function></literal> </entry> <entry>(same as input)</entry> - <entry>smallest integer not less than argument</entry> + <entry>smallest following integer not less than argument</entry> <entry><literal>ceil(-42.8)</literal></entry> <entry><literal>-42</literal></entry> </row> @@ -715,7 +715,7 @@ <literal><function>ceiling(<type>dp</type> or <type>numeric</type>)</function></literal> </entry> <entry>(same as input)</entry> - <entry>smallest integer not less than argument (alias for <function>ceil</function>)</entry> + <entry>smallest following integer not less than argument (alias for <function>ceil</function>)</entry> <entry><literal>ceiling(-95.3)</literal></entry> <entry><literal>-95</literal></entry> </row> @@ -768,7 +768,7 @@ <literal><function>floor(<type>dp</type> or <type>numeric</type>)</function></literal> </entry> <entry>(same as input)</entry> - <entry>largest integer not greater than argument</entry> + <entry>largest previous integer not greater than argument</entry> <entry><literal>floor(-42.8)</literal></entry> <entry><literal>-43</literal></entry> </row>
-- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs