Decimal and Exponentiation

Raymond L. Buvel levub137 at
Sat May 20 12:57:25 CEST 2006

elventear wrote:
> Hi,
> I am the in the need to do some numerical calculations that involve
> real numbers that are larger than what the native float can handle.
> I've tried to use Decimal, but I've found one main obstacle that I
> don't know how to sort. I need to do exponentiation with real
> exponents, but it seems that Decimal does not support non integer
> exponents.
> I would appreciate if anyone could recommend a solution for this
> problem.
> Thank you.
The clnum module has arbitrary precision floating point and complex
numbers with all of the standard math functions.  For example, the cube
root of 2 can be computed to 40 decimal places with the following.

>>> from clnum import mpf,mpq
>>> mpf(2,40)**mpq(1,3)

For more information see

More information about the Python-list mailing list