[egenix-users] bugs in mx.Number.Rational

Jeffrey O'Neill jeff.oneill at gmail.com
Wed Sep 7 10:53:53 CEST 2005


Hello,

I recently installed your mx.Number package in order to use the Rational 
number type in a software package I am working on: http://stv.sf.net. I do 
fairly intensive computations and I would like to convert my floating point 
calculations to rational number calculations.

Overall it seems to be working well, but I'm wondering if the following are 
two bugs:

(1) 
from math import *
a = Rational(pi) * Rational(e)
b = Rational(pi) / Rational(e)
a > b returns True as expected
a < b returns False as expected
a == b returns RuntimeWarning tp_compare didn't return -1, 0 or 1

(2)
a = Rational(1, 2)
a < 0.1 incorrectly returns True

Any thoughts would be greatly appreciated.

best regards,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20050907/b568544f/attachment-0139.htm


More information about the egenix-users mailing list