I appreciate the inclusion of the fractions module in Python 2.6 and<br>
therefore in Python 3.0. But I feel there's something missing: no<br>
possibility for complex rationals (or arbitrary precision) integers. I<br>
was just checking the complex number support in Python, compared, for<br>
instance, to Common Lisp and Scheme, and I realized that there was<br>
this subtle omission. The inclusion of rationals and arbitrary<br>
integers is cool, but the numeric tower (say, compared to Scheme) is<br>
not complete. I don't think there would be a performance hit if<br>
complex rationals were provided. Ordinary operations on complex<br>
floats, in theory, should not be affected and handled separately. But<br>
it would be nice to be able to do:<br>
<br>
(3/4 + 1/2j) * (1/4 - j) = 11/16 - 5/8j<br>
<br>
with no loss of precision.<br>
<br>
Python is heavily used in math and science all over the world. We've<br>
even got a recent symbolic math project (sympy) that looks very<br>
promising, so I guess this could be an important issue.<br>
<br>
Note: there exists a library that implements what I'm talking about:<br>
<a href="http://calcrpnpy.sourceforge.net/clnum.html" target="_blank">http://calcrpnpy.sourceforge.net/clnum.html</a><br>
but still I personally would have liked to see this stuff included<br>
natively in the new Python 3.0.