[issue9025] Non-uniformity in randrange for large arguments.

Mark Dickinson report at bugs.python.org
Fri Jun 18 17:01:04 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Here's a more careful Python-only patch that fixes the bias in randrange and randint (but not in shuffle, choice or sample).  It should work well both for Mersenne Twister and for subclasses of Random that use a poorer PRNG with badly-behaved low-order bits.

----------
Added file: http://bugs.python.org/file17707/issue9025_v2.patch

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


More information about the Python-bugs-list mailing list