public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Math function description issue
Date: Tue, 7 Jun 2016 11:15:37 +0900
Message-ID: <CAB7nPqSiJwS_YTyy_v5ZDKV-ywGs5wV9YrXwT=uOp1hMS-oY=A@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-docs>
On Mon, Jun 6, 2016 at 2:40 PM, <[email protected]> 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
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/x-diff] doc-floor-ceil.patch (1.5K, 2-doc-floor-ceil.patch)
download | inline diff:
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>
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Math function description issue
In-Reply-To: <CAB7nPqSiJwS_YTyy_v5ZDKV-ywGs5wV9YrXwT=uOp1hMS-oY=A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox