This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Dave.Reid, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2012-06-02.08:32:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338625973.28.0.3126152926.issue14591@psf.upfronthosting.co.za>
In-reply-to
Content
Responding to a comment from Serhiy on Rietveld:

> Modules/_randommodule.c:442: mt[0] = 0x80000000UL;
> mt[0] |= 0x80000000UL (according to the comment)?

The = 0x80000000UL was intentional.  The low-order 31 bits of mt[0] don't form part of the state of the Mersenne Twister:  the resulting random stream isn't affected by their values.  So all we have to do is make sure that bit 31 is set.  It's the same code that's used in init_by_array earlier in _randommodule.c.
History
Date User Action Args
2012-06-02 08:32:53mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, pitrou, vstinner, serhiy.storchaka, Dave.Reid
2012-06-02 08:32:53mark.dickinsonsetmessageid: <1338625973.28.0.3126152926.issue14591@psf.upfronthosting.co.za>
2012-06-02 08:32:52mark.dickinsonlinkissue14591 messages
2012-06-02 08:32:52mark.dickinsoncreate