Using fractions instead of floats

richyjsm at gmail.com richyjsm at gmail.com
Tue Oct 2 02:20:22 CEST 2007


On Oct 1, 8:30 am, Nick Craig-Wood <n... at craig-wood.com> wrote:
>   >>> mpq(1,3)+0.6
>   mpq(14,15)

Golly!  That's quite impressive.  And more than a little bit magic as
well, since 0.6 is definitely not the same as 3/5.  How on earth does
this work?

Richard




More information about the Python-list mailing list