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 tim.peters
Recipients Serge Anuchin, mark.dickinson, r.david.murray, rhettinger, serhiy.storchaka, skrah, steven.daprano, tim.peters, vstinner
Date 2015-07-05.02:38:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436063896.9.0.497687123133.issue24546@psf.upfronthosting.co.za>
In-reply-to
Content
Raymond, there are (at least) two bugs here:

1. The original bug report.  Nobody yet has any plausible theory for what went wrong there.  So "won't fix" wouldn't be appropriate.  If the OP can't provide more information, neither a reproducible test case, then after a while closing this report as "works for me" would be appropriate.

2. The "double rounding" bug.  That cannot be the cause of the OP's problem, so doesn't really belong in this report.

Nobody knows how rare it is.  I suspect, but have not proved, that 1. - 2.**-53 is the only random.random() result for which it's possible that double-rounding can cause int(i * random.random()) == i.  Given that unlikely - but possible - value, there are at least half a million ints 0 < i < 1000000000 for which equality holds (but only on platforms where the double rounding bug is possible, which doesn't include any platform I use ;-) ).

That probably should get a report of its own.  It's unintended and unanticipated behavior, causing simple code to raise a wholly unexpected & unpredictable exception.  That's "a bug" to me.
History
Date User Action Args
2015-07-05 02:38:16tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, vstinner, steven.daprano, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin
2015-07-05 02:38:16tim.peterssetmessageid: <1436063896.9.0.497687123133.issue24546@psf.upfronthosting.co.za>
2015-07-05 02:38:16tim.peterslinkissue24546 messages
2015-07-05 02:38:15tim.peterscreate