STINNER Victor <victor.stin...@haypocalc.com> added the comment:

randint.py: another algorithm to generate a random integer in a range. It uses 
only operations on unsigned integers (no evil floatting point number). It calls 
tick() multiple times to generate enough entropy. It has an uniform 
distribution (if the input generator has an uniform distribution).

tick() is simply the output of the Mersenne Twister generator. The algorithm 
can be optimized (especially the part computing ndigits and scale).

----------
Added file: http://bugs.python.org/file17757/randint.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9025>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to