Python math is off by .000000000000045

jmfauth wxjmfauth at gmail.com
Sun Feb 26 10:59:14 CET 2012


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.






More information about the Python-list mailing list