Author vstinner
Recipients belopolsky, mark.dickinson, orsenthil, pitrou, rhettinger, terry.reedy, vstinner
Date 2010-06-24.01:41:30
SpamBayes Score 0.0313978
Marked as misclassified No
Message-id <1277343694.45.0.410156973012.issue9025@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2010-06-24 01:41:34vstinnersetrecipients: + vstinner, rhettinger, terry.reedy, mark.dickinson, belopolsky, orsenthil, pitrou
2010-06-24 01:41:34vstinnersetmessageid: <1277343694.45.0.410156973012.issue9025@psf.upfronthosting.co.za>
2010-06-24 01:41:32vstinnerlinkissue9025 messages
2010-06-24 01:41:31vstinnercreate