[issue13060] allow other rounding modes in round()

Arne Babenhauserheide report at bugs.python.org
Thu May 24 16:30:50 CEST 2012


Arne Babenhauserheide <arne_bab at web.de> added the comment:

I also think that rounding half away from zero would be the most obvious choice, as it does not introduce a bias for random numbers distributed around 0 while being close to what I would expect from school mathematics.

The case of n*(random() - 0.5) which I assume as common, this should work well, which is not the case for rounding towards +infinity.

----------

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


More information about the Python-bugs-list mailing list