This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients christian.heimes, python-dev, tim.peters, vstinner, zach.ware
Date 2013-12-24.14:08:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387894088.65.0.812655895608.issue19999@psf.upfronthosting.co.za>
In-reply-to
Content
> 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)
History
Date User Action Args
2013-12-24 14:08:08vstinnersetrecipients: + vstinner, tim.peters, christian.heimes, python-dev, zach.ware
2013-12-24 14:08:08vstinnersetmessageid: <1387894088.65.0.812655895608.issue19999@psf.upfronthosting.co.za>
2013-12-24 14:08:08vstinnerlinkissue19999 messages
2013-12-24 14:08:08vstinnercreate