[pypy-issue] Issue #2413: random.uniform(0, 1) can produce "nan" number (pypy/pypy)

Daniil Yarancev issues-reply at bitbucket.org
Mon Oct 10 08:51:31 EDT 2016


New issue 2413: random.uniform(0, 1) can produce "nan" number
https://bitbucket.org/pypy/pypy/issues/2413/randomuniform-0-1-can-produce-nan-number

Daniil Yarancev:

Latest build from buildbot (PyPy3)  - Python 3.5.1 (c9676f35333a, Oct 09 2016, 04:13:00)
Consider the following example:
```
#!python

import math
import random
for x in range(1000):
    val = random.uniform(0, 1)
    if math.isnan(val):
        print(val)

```
So PyPy3 can produce here 0~5 nan's.





More information about the pypy-issue mailing list