[issue17259] Document round half to even rule for floats

alexd2 report at bugs.python.org
Sun Dec 8 12:01:45 CET 2013


alexd2 added the comment:

I encountered the same inconsistent behavior. That is, I don't get the same rounding from the two following commands:

print "%.f %.f" %(0.5, 1.5)               # Gives --> 0 2
print "%.f %.f" %(round(0.5), round(1.5)) # Gives --> 1 2

I also get:
print round(0.5), round(1.5) # Gives --> 1.0 2.0

>From what I read in the thread it seems to be more like a bug rather than something to just be documented, right?

----------
nosy: +alexd2

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


More information about the Python-bugs-list mailing list