Using fractions instead of floats

richyjsm at richyjsm at
Tue Oct 2 02:20:22 CEST 2007

On Oct 1, 8:30 am, Nick Craig-Wood <n... at> 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?


More information about the Python-list mailing list