Dave Angel <da...@davea.name>: > What you don't say is which behavior you actually expected. Since 0**0 > is undefined mathematically, I'd expect either an exception or a NAN > result.
IEEE 754 mandates that 0**0 should evaluate to 1: <URL: http://en.wikipedia.org/wiki/NaN#Operations_generating_NaN> The standard pow function and the integer exponent pown function define 0**0, 1**∞, and ∞**0 as 1. The powr function defines all three indeterminate forms as invalid operations and so returns NaN. Should IEEE 754's anomalies spill over to decimal, is a different question. Marko -- https://mail.python.org/mailman/listinfo/python-list