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 steven.daprano
Recipients Serge Anuchin, mark.dickinson, r.david.murray, rhettinger, serhiy.storchaka, skrah, steven.daprano, tim.peters, vstinner
Date 2015-07-02.23:58:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20150702235824.GL10773@ando.pearwood.info>
In-reply-to <1435858553.83.0.465798204707.issue24546@psf.upfronthosting.co.za>
Content
On Thu, Jul 02, 2015 at 05:35:53PM +0000, Tim Peters wrote:
> Steven, there's something wrong with the arithmetic on your machine, 
> but I can't guess what from here (perhaps you have a non-standard 
> rounding mode enabled, perhaps your CPU is broken, ...).

It's not just me. Others have confirmed the same behaviour, but only 
on 32-bit Linux:

https://mail.python.org/pipermail/python-list/2015-July/693481.html

Thread begins here:
https://mail.python.org/pipermail/python-list/2015-July/693457.html

> For a start, is it the multiplication that's broken on your machine, or the int() part?

Looks like multiplication:

>>> x = 1.-2.**-53
>>> assert x.hex() == '0x1.fffffffffffffp-1'
>>> assert (2049.0).hex() == '0x1.0020000000000p+11'
>>> (x*2049.0).hex()  # Should be '0x1.001ffffffffffp+11'
'0x1.0020000000000p+11'

I'd like to see what result the OP gets if he runs this. Serge is using 
Linux, but if I'm reading it right, it looks like a 64-bit Linux.
History
Date User Action Args
2015-07-02 23:58:56steven.dapranosetrecipients: + steven.daprano, tim.peters, rhettinger, mark.dickinson, vstinner, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin
2015-07-02 23:58:55steven.dapranolinkissue24546 messages
2015-07-02 23:58:55steven.dapranocreate