[issue24567] random.choice IndexError due to double-rounding

Stefan Krah report at bugs.python.org
Sun Jul 5 11:24:11 CEST 2015


Stefan Krah added the comment:

I've finally gotten hold of a gcc (5.1.0) that produces the unwanted code.

For a *different* test case, even the -O0 and -O2 results differ, since
with -O2 gcc uses mpfr (I think!) for constant folding, which produces
the correct result.


Using -mfpmath=sse seems to fix all test cases that I've tried.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24567>
_______________________________________


More information about the Python-bugs-list mailing list