Rounding strategy
The Post Office <noreply@postgresql.org>
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: rudolphfroger@dreamsolution.nl
Date: 2021-04-19T08:00:07Z
Lists: pgsql-docs
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/13/functions-math.html Description: The 'round' mathematical function documentation doesn't specify its rounding strategy. If this would be documented then users can rely on its rounding behavior. For double precision the rounding probably depends on your platform. For numeric the function seems to round to nearest with ties going away from zero (sometimes referred to as "round half up). 6.5 -> 7.0 and -6.5 -> -7.0.
Commits
-
Doc: document the tie-breaking behavior of the round() function.
- 82b13dbc4d4b 14.0 landed
- 00037d8d0040 13.3 landed