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 klankschap
Recipients klankschap, ronaldoussoren
Date 2013-01-23.17:32:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358962332.33.0.660025767409.issue17020@psf.upfronthosting.co.za>
In-reply-to
Content
I recently noticed that the standard random() function generates values >= 1.0

As processes are called from an event scheduler, each process has its own Random() instance.

    self.random = random.Random(seed)
    self.randomState = self.random.getstate()



keeping track of multiple objects:

    self.random.setstate(self.randomState)
    self.random.jumpahead(1)
    self.randomState = self.random.getstate()


Also gammavariate() generates errors as it too makes use of the _random() call

A workaround is to check each response of random() for values >= 1.0
History
Date User Action Args
2013-01-23 17:32:12klankschapsetrecipients: + klankschap, ronaldoussoren
2013-01-23 17:32:12klankschapsetmessageid: <1358962332.33.0.660025767409.issue17020@psf.upfronthosting.co.za>
2013-01-23 17:32:12klankschaplinkissue17020 messages
2013-01-23 17:32:11klankschapcreate