Decimal 0**0

Stefan Krah stefan at bytereef.org
Tue Feb 5 14:05:26 CET 2013


Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
> Does anyone have an explanation why Decimal 0**0 behaves so differently from
> float 0**0?
> 
> Tested in both Python 2.7 and 3.3, float 0**0 returns 1, as I would expect:

The behavior follows the specification:

http://speleotrove.com/decimal/daops.html#refpower


Why exactly the decision was made I cannot say.



Stefan Krah






More information about the Python-list mailing list