[issue19999] test_monotonic fails on x86 OpenIndiana

STINNER Victor report at bugs.python.org
Tue Dec 24 15:08:08 CET 2013


STINNER Victor added the comment:

> but 0.0156001 isn't close enough to 0.015625 for "rounding errors" to be at all a plausible explanation for why it's so strange.

0.0156001 is close to 0.0156, and this number cannot be representated exactly in binary:

>>> (0.0156).hex()
'0x1.ff2e48e8a71dep-7'

C code used by Python:

GetSystemTimeAdjustment(&timeAdjustment, &timeIncrement,
                        &isTimeAdjustmentDisabled);
info->resolution = timeIncrement * 1e-7;

(And yes, 0.0156001 is surprising, I also expected 1/64, 0.015625)

----------

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


More information about the Python-bugs-list mailing list