Python math is off by .000000000000045

Ethan Furman ethan at stoneleaf.us
Mon Feb 27 18:28:44 CET 2012


jmfauth wrote:
> On 25 fév, 23:51, Steven D'Aprano <steve
> +comp.lang.pyt... at pearwood.info> wrote:
>> On Sat, 25 Feb 2012 13:25:37 -0800, jmfauth wrote:
>>>>>> (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
>> What's your point? I'm afraid my crystal ball is out of order and I have
>> no idea whether you have a question or are just demonstrating your
>> mastery of copy and paste from the Python interactive interpreter.
> 
> It should be enough to indicate the right direction
> for casual interested readers.

I'm a casual interested reader and I have no idea what your post is 
trying to say.

~Ethan~



More information about the Python-list mailing list