Decimal and Exponentiation
tim.peters at gmail.com
Sat May 20 17:26:42 CEST 2006
[Raymond L. Buvel, on
> The clnum module handles this calculation very quickly:
> >>> from clnum import mpf
> >>> mpf("1e10000") ** mpf("3.01")
That's probably good enough for the OP's needs -- thanks!
OTOH, it's not good enough for the decimal module:
exactly, and the proposed IBM standard for decimal arithmetic requires
error < 1 ULP (which implies that if the mathematical ("infinite
precision") result is exactly representable, then that's the result
you have to get). It would take some analysis to figure out how much
of clnum's error is due to using binary floats instead of decimal, and
how much due to its pow implementation.
More information about the Python-list