[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-06-30 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6df0b4ed8617 by Mark Dickinson in branch '2.7': Closes #14591: Random.jumpahead could produce an invalid MT state on 64-bit machines. http://hg.python.org/cpython/rev/6df0b4ed8617 -- nosy: +python-dev

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-06-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: rhettinger - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-06-24 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: The patch is fine but would be a bit better if the two loop passes were merged and if the tmp variable were renamed to something like nonzero or somesuch. -- ___ Python tracker

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-06-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Raymond, can this patch be applied? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-06-14 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: The = 0x8000UL 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. Thanks, I have no more questions. --

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-06-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Responding to a comment from Serhiy on Rietveld: Modules/_randommodule.c:442: mt[0] = 0x8000UL; mt[0] |= 0x8000UL (according to the comment)? The = 0x8000UL was intentional. The low-order 31 bits of mt[0] don't form part of

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-05-09 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___ ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-05-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: In test_random, you should use assertLess so that the offending value is displayed on failure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-05-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Done. -- Added file: http://bugs.python.org/file25508/random_jumpahead_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Value returned by random.random() out of valid range - Value returned by random.random() out of valid range on 64-bit ___ Python tracker rep...@bugs.python.org

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch should probably come with an unit test. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch with unit test. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___ ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Dang. Patch now attached. -- Added file: http://bugs.python.org/file25304/random_jumpahead_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591