On Nov 14, 2007 8:21 PM, <[EMAIL PROTECTED]> wrote: > You could also use the Decimal module to keep things accurate. Some > people like numpy or scipy for the more complex math problems they do.
Unlike mpmath, the decimal module doesn't support non-integer powers (except for square roots), and nor does gmpy (though you can do them indirectly as mensanator showed earlier in the thread). And numpy / scipy don't support arbitrary-precision floats. Now, if you really want exact arithmetic, SymPy is the winner: >>> from sympy import * >>> x = 1234 ** Rational('10.9') >>> x 8187505353567209228244052427776*1234**(9/10) >>> x / 1234**10 1234**(9/10) >>> x.evalf() 4.958327864815504147741523444E+33 Fredrik -- http://mail.python.org/mailman/listinfo/python-list