[issue9025] Non-uniformity in randrange for large arguments.
STINNER Victor
report at bugs.python.org
Thu Jun 24 09:46:59 CEST 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Distribution with my algorithm:
...
from collections import Counter
print Counter(_randint(6755399441055744) % 3 for _ in xrange(100000000))
=> Counter({0L: 33342985, 2L: 33335781, 1L: 33321234})
Distribution: {0: 0.33342985000000003, 2: 0.33335780999999998, 1: 0.33321234}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9025>
_______________________________________
More information about the Python-bugs-list
mailing list