commit | 73ced7ee995180c0bd8d96ff7d7fb614a744ad7d | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Sat Jan 04 09:26:32 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Sat Jan 04 09:26:32 2003 +0000 |
tree | 6f947e5610c1d232c7b2b1267b8ca919331ca01e | |
parent | 3a57d9de076d255f5cf46816c07e79a8c9b76ec4 [diff] |
Correct long standing bugs in the methods for random distributions. The range of u=random() is [0,1), so log(u) and 1/x can fail. Fix by setting u=1-random() or by reselecting for a usable value. Will backport.