Bug #66816 Wrong rounding term in documentation
Submitted: 14 Sep 2012 10:00 Modified: 21 Sep 2012 11:04
Reporter: Anton Avramov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: away from zeor, half up, round, Rounding

[14 Sep 2012 10:00] Anton Avramov
Description:
The documentation for round function states: 
For exact-value numbers, ROUND() uses the "round half up" rule: A value with a fractional part of .5 or greater is rounded up to the next integer if positive or down to the next integer if negative. (In other words, it is rounded away from zero.) A value with a fractional part less than .5 is rounded down to the next integer if positive or up to the next integer if negative.
Which means 23.5 would be round to 24 and -23.5 would be rounded to -24. 
However if we see the definition described in wikipedia: http://en.wikipedia.org/wiki/Rounding#Round_half_up 
Half up would round to -23. 
The corrent rounding term in the documentation that aplies to mysql would be: 
http://en.wikipedia.org/wiki/Rounding#Round_half_away_from_zero
"Round half away from zero"

How to repeat:
Open documentation pages like: 
http://dev.mysql.com/doc/refman/5.6/en/precision-math-rounding.html
http://dev.mysql.com/doc/refman/5.6/en/mathematical-functions.html#function_round

And for any earlier version

Suggested fix:
Change "round half up" in documentation to Round half away from zero.
[14 Sep 2012 19:26] Sveta Smirnova
Thank you for the report.

Verified as described.
[21 Sep 2012 11:04] Stefan Hinz
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.