On Oct 1, 7:20 pm, [EMAIL PROTECTED] wrote:
> On Oct 1, 8:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> 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.  

It's not? Since when?

>>> print gmpy.mpq('0.6')
3/5

> How on earth does this work?

The rationals are always reduced to lowest terms.

>
> Richard


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to