def power, problem when raising power to decimals
dickinsm at gmail.com
Thu Apr 17 15:38:11 CEST 2008
On Apr 16, 11:03 pm, "Terry Reedy" <tjre... at udel.edu> wrote:
> | decimal.InvalidOperation: 0 ** 0
> I would think of this as a bug unless the standard Decimal follows demands
It does. From http://www2.hursley.ibm.com/decimal/daops.html#refpower
"If both operands are zero, or if the left-hand operand is less than
zero and the right-hand operand does not have an integral value or
is infinite, an Invalid operation condition is raised, the result is
[0,qNaN], and the following rules do not apply."
I'm hoping that this will change with the next update of the standard.
More information about the Python-list