Message246106
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. |
|
Date |
User |
Action |
Args |
2015-07-02 23:58:56 | steven.daprano | set | recipients:
+ steven.daprano, tim.peters, rhettinger, mark.dickinson, vstinner, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin |
2015-07-02 23:58:55 | steven.daprano | link | issue24546 messages |
2015-07-02 23:58:55 | steven.daprano | create | |
|