Files
cpython/Lib/random.py
Raymond Hettinger 63b5156e6e 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.
2003-01-04 09:30:32 +00:00

26 KiB