[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0
Tim Peters
report at bugs.python.org
Sat Jan 10 04:08:17 CET 2015
Tim Peters added the comment:
This is easy: Cowlishaw is wrong on this one, but nothing can be done about it ;-)
Confusion arises because most people think of 0**0 as a value (where it certainly must be 1) while others seem to view it as some kind of shorthand for expressing a limit (as the base and/or exponent _approach_ 0, in which case there is no correct answer - it's an "indeterminate form").
It's in the "spirit of 754" to take inputs at face value, viewing them as infinitely precise. So viewing 0**0 as anything other than 1 in this context is perverse.
Centuries of history distilled to a few paragraphs here:
http://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_power_of_zero
----------
nosy: +tim.peters
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23201>
_______________________________________
More information about the Python-bugs-list
mailing list