Python math is off by .000000000000045

jmfauth wxjmfauth at gmail.com
Sat Feb 25 22:25:37 CET 2012


>>> (2.0).hex()
'0x1.0000000000000p+1'
>>> (4.0).hex()
'0x1.0000000000000p+2'
>>> (1.5).hex()
'0x1.8000000000000p+0'
>>> (1.1).hex()
'0x1.199999999999ap+0'
>>>

jmf



More information about the Python-list mailing list