[docs] [issue17259] Document round half to even rule for floats

Terry J. Reedy report at bugs.python.org
Sat Feb 23 02:39:46 CET 2013


Terry J. Reedy added the comment:

When I wrote my previous message, I was reading the link above and did not notice that it want to the old 2.7 docs. The 3.x entry is fine.

Perhaps 6.1.3.1. Format Specification Mini-Language could end with
  Rounding of floats is the same as for round().
under the box, with 'round()' linked to its entry.

>From what you said, % does half to even on my system only because that is what MC VC10 does. 4.7.2. printf-style String Formatting could add "Rounding is system dependent" as note 6 (currently missing!).

I removed 2.7 because is seems like a mess and mostly does not use the new rule. But from what you say, only round() itself is different. 'Half-away-from-0' could be added, with a note about changing in py 3.
The note for .format would have to give the rule rather than refer to round(). Did I get it all right?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17259>
_______________________________________


More information about the docs mailing list