[Python-bugs-list] [ python-Bugs-812202 ] randint is always even

SourceForge.net noreply at sourceforge.net
Thu Sep 25 00:52:25 EDT 2003


Bugs item #812202, was opened at 2003-09-24 23:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=812202&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ronald L. Rivest (ronrivest)
Assigned to: Nobody/Anonymous (nobody)
Summary: randint is always even

Initial Comment:
The result of 

    random.randint(2**64,2**65-1) 

is always even!



(I was trying to find some large prime numbers, and

was puzzled by the fact that none were turning

up.  Finally, I discovered that randint wasn't really

returning "random" integers as desired, but only

even ones.)



I'm not sure what the cause of the problem is, but

randint should work properly, even when the given

endpoints are large...



Thanks...



        Ron Rivest



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=812202&group_id=5470



More information about the Python-bugs-list mailing list