[issue21179] Rounding half to even

2014-04-09 Thread Mark Dickinson
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

[issue21179] Rounding half to even

2014-04-09 Thread Roundup Robot
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 <

[issue21179] Rounding half to even

2014-04-08 Thread Josh Rosenberg
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

[issue21179] Rounding half to even

2014-04-08 Thread Clinton Curry
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