Subject: Re: [webmaster] Documentation Error: Ceiling, Floor

From: "Jonathan S. Katz" <[email-masked]>
Date: Tue, 3 May 2016 10:38:44 -0400

Hi Patrick,

> On May 3, 2016, at 5:00 AM, patrick s. <[email-masked]> wrote:
> 
> Dear PostgreSQL developers and webmasters
> 
> It appears that the documentation of the mathematical functions "ceiling" and "floor" are wrong (inverted).
> 
> result is correct and as one would expect::
> select ceiling(43.8); =>44
> select floor(43.8);  =>43
> 
> documentation is misleading:
> select ceiling(43.8); =>43
> select floor(43.8); =>44
> 
> found in:
> http://www.postgresql.org/docs/9.1/static/functions-math.html
> http://www.postgresql.org/docs/7.4/static/functions-math.html

This should be sent to pgsql-docs (which I have CC’d)

Thanks!

Jonathan

-- 
Sent via pgsql-docs mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

---

From: "patrick s." <[email-masked]>
Date: Tue, 3 May 2016 16:52:36 +0200

Thanks, Jonathan

Didn't see whom to contact on the PG-Pages, but wanted to help.

Cheers, P

---

From: "Jonathan S. Katz" <[email-masked]>
Date: Tue, 3 May 2016 11:15:08 -0400

Hi Patrick,

> On May 3, 2016, at 10:52 AM, patrick s. <[email-masked]> wrote:
> 
> Thanks, Jonathan
> 

Not a problem! I wanted to make sure the correct people saw it :-)

Best,

Jonathan

---

From: Tom Lane <[email-masked]>
Date: Tue, 03 May 2016 11:26:16 -0400

[ trimming 100%-inappropriate crossposts ]

>> http://www.postgresql.org/docs/7.4/static/functions-math.html

AFAICS, those examples refer to -43.8 not 43.8, and are quite correct.

			regards, tom lane

---

From: "patrick s." <[email-masked]>
Date: Tue, 3 May 2016 17:36:00 +0200

Thanks, Tom.

Can confirm this. My error was that examples for "round" are using 
positive values and examples of "ceiling"/"floor" are using negative 
ones. Maybe misleading on a fast look.

Sorry for wasting your time, guys!

Patrick