[Python-Dev] Decimal and Exponentiation

Tim Peters tim.peters at gmail.com
Tue May 23 16:48:52 CEST 2006

[Facundo Batista]
> I'd start to see this not before two weeks (I have a conference, and
> need to finish my papers).
> TIm, we both know that I'm not, under any point of view, a numeric
> expert. So, I'd ask you a favor.
> Could you please send here some examples, for a given precision, of
> perilous "not-int ** not-int" situations, just to add them to the test
> cases and be sure that the modifications to Decimal are safe enough?
> Or just point to some docs?

This is all part of IBM's spec (31 Mar 2006) now:


Here's the change log from December:

Changes in Draft 1.50 (9 December 2005)

    * The exp operation for raising e to a power has been added.
    * The ln natural logarithm and log10 base 10 logarithm operations
have been added.
    * The power operation has been redefined to allow raising a number
to a non-integral power.

The change log for the test vectors (at the same site) implies the
tests have also been updated to match:

Changes in Version 2.35 (27 November 2005)

    * The exp, ln, and log10 operations and testcase groups have been added.
    * The power testcase group has been greatly extended, to cover
non-integer second operands, and the powersqrt testcase group has been

So tests probably aren't a problem.  Implementation will be, and I'll
do that if I can -- designing efficient arbitrary-precision
transcendental functions is an obscure skill.

More information about the Python-Dev mailing list