]> granicus.if.org Git - python/commit
SF bug #812202: randint is always even
authorRaymond Hettinger <python@rcn.com>
Sun, 5 Oct 2003 09:09:15 +0000 (09:09 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 5 Oct 2003 09:09:15 +0000 (09:09 +0000)
commit2f726e9093381572b21edbfc42659ea89fbdf686
tree9625e748344e1709fc69a8b98298efdd602b4cc2
parent5c68ef04b7f0c0c1d342647a7db2d3f76637d3fa
SF bug #812202:  randint is always even

* Added C coded getrandbits(k) method that runs in linear time.
* Call the new method from randrange() for ranges >= 2**53.
* Adds a warning for generators not defining getrandbits() whenever they
  have a call to randrange() with too large of a population.
Doc/lib/librandom.tex
Lib/random.py
Lib/test/test_random.py
Misc/NEWS
Modules/_randommodule.c