pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ceil/ceiling/floor mathematical functions documented output is incorrect
2+ messages / 2 participants
[nested] [flat]

* ceil/ceiling/floor mathematical functions documented output is incorrect
@ 2020-04-04 14:54 PG Doc comments form <noreply@postgresql.org>
  2020-04-04 15:14 ` Re: ceil/ceiling/floor mathematical functions documented output is incorrect Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2020-04-04 14:54 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: jon4syth@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/functions-math.html
Description:

The ceil, ceiling, and floor mathematical functions in documentation
versions 9.5 through 12, and probably others is not correct.  The example
output shows the ceil* functions returning the integer below the float value
while the floor function shows the opposite.  Thanks!


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ceil/ceiling/floor mathematical functions documented output is incorrect
  2020-04-04 14:54 ceil/ceiling/floor mathematical functions documented output is incorrect PG Doc comments form <noreply@postgresql.org>
@ 2020-04-04 15:14 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-04-04 15:14 UTC (permalink / raw)
  To: jon4syth@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.org> writes:
> The ceil, ceiling, and floor mathematical functions in documentation
> versions 9.5 through 12, and probably others is not correct.  The example
> output shows the ceil* functions returning the integer below the float value
> while the floor function shows the opposite.  Thanks!

No, they're correct as they stand.  These examples intentionally use
negative numbers to make the point that the rounding is towards or
away from plus-infinity, not towards or away from zero.

If we had room for more than one example, I'd be inclined to make these
cases be secondary examples rather than the only one.  There's some work
afoot to restructure this chapter's function tables in a way that would
make that a bit less painful vertical-space-wise, so maybe it'll get
done soon.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-04-04 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 14:54 ceil/ceiling/floor mathematical functions documented output is incorrect PG Doc comments form <noreply@postgresql.org>
2020-04-04 15:14 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox