Rational numbers
Gabriel Genellina
gagsl-py at yahoo.com.ar
Fri Feb 23 18:20:12 EST 2007
En Fri, 23 Feb 2007 12:35:19 -0300, Martin Manns <mmanns at gmx.de> escribió:
> I am starting to use rationals and since I found no batteries included,
> I tried out the mxNumber package.
>
> However, I get strange warnings on comparison operations
> (which however seem to yield correct results):
mx.Number.Rational is horribly broken. They break this rule:
a==b => hash(a)==hash(b)
so they can'b be used as dictionary keys, by example.
Try the other packages suggested. I've used clnum without problems.
--
Gabriel Genellina
More information about the Python-list
mailing list