[issue24567] random.choice IndexError due to double-rounding
Tim Peters
report at bugs.python.org
Sun Jun 24 21:38:32 EDT 2018
Tim Peters <tim at python.org> added the comment:
There are a couple bug reports here that have been open for years, and it's about time we closed them.
My stance: if any platform still exists on which "double rounding" is still a potential problem, Python _configuration_ should be changed to disable double rounding on such platforms (there's usually a C compiler flag that can make this happen, but even if there isn't a couple lines of inline assembler could be added at Python startup to set the Pentium's FPU "precision control" bits to "round to 53 bits" mode).
`random` is a red herring here! We don't want gratuitously different results across 754 boxes in any operations.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24567>
_______________________________________
More information about the Python-bugs-list
mailing list