[issue24546] sequence index bug in random.choice

STINNER Victor report at bugs.python.org
Thu Jul 2 16:44:49 CEST 2015


STINNER Victor added the comment:

> Your example of int(0.99999999999999995) returning 1 is misleading

On my setup, this number is rounded 1.0:

>>> float('0.99999999999999995').hex()
'0x1.0000000000000p+0'

CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
OS: Fedora release 22
Python 2.7.10 or 3.4.2 (same result for both versions)

----------
nosy: +haypo

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


More information about the Python-bugs-list mailing list