[pypy-issue] [issue1381] random() generator returning result outside the 0.0 .. 1.0 domain.
klankschap
tracker at bugs.pypy.org
Thu Jan 24 00:42:58 CET 2013
klankschap <vm at klankschap.nl> added the comment:
On 23 Jan 2013, at 21:18, Amaury Forgeot d Arc wrote:
>
> Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:
>
> Unfortunately the unit test added by CPython http://hg.python.org/cpython/rev/6df0b4ed8617
> already passes with PyPy. Did you experience this issue on PyPy?
>
> The test passes probably for a bad reason, the jumpahead implementation is slightly different on PyPy:
> compare
> for (i = N-1; i > 1; i--) {
> with
> for i in range(N - 1, 0, -1):
i do have the same issue with pypy.
Pretty annoying as you have to insert ad hoc checks for
u = random()
But it seems related to the random.jumpahead() function.
.F
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1381>
________________________________________
More information about the pypy-issue
mailing list