Mark Dickinson added the comment:
Yep, 2.7 does round-ties-away-from-zero. There's even special code for that:
the underlying machinery does a round-ties-to-even, and then there's a hack on
top of that to convert to round-ties-away-from-zero.
Looks like this error went unnoticed for quite a w
Roundup Robot added the comment:
New changeset 7ec8c4555772 by Mark Dickinson in branch '2.7':
Issue #21179: Fix description of 'round' function for numbers.Real.
http://hg.python.org/cpython/rev/7ec8c4555772
--
nosy: +python-dev
___
Python tracker
<
Josh Rosenberg added the comment:
Python 3.2-3.4 (probably all of 3.x) use round half even, but testing 2.7.3 on
Ubuntu confirms what you say. In terms of the decimal constants, Py2.7 round()
appears to use decimal.ROUND_HALF_UP behavior while 3.x uses
decimal.ROUND_HALF_EVEN behavior.
Looks
New submission from Clinton Curry:
In the current Python 2.7 documentation, Section 5.4
https://docs.python.org/2.7/library/stdtypes.html
the result of the round function is described as "x rounded to n digits,
rounding half to even. If n is omitted, it defaults to 0." However, my
observed b