4 ms·
Understanding Exponents (Why does 0^0 = 1?)
- cperciva 18y agoThe article claims that 0^0 is 1 because it is defined to be 1; the article is wrong. 0^0 is undefined, just like 0/0.
- nsrivast 18y agoWell it sort of depends on context. http://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_zero_power http://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_zero...
- lacker 18y ago$ python >>> 0 ** 0 1 >>> 0 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero >>>
- cperciva 18y agoMathematics is not defined by how python does arithmetic.
- RiderOfGiraffes 18y agoThe article is OK, and deals with taking exponentiation out of the "repeated multiplication" model and generalising it. However it is wrong when it states that 0^0 = 1 simply by definition. The WikiPedia article is comprehensive, informative and accurate. http://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_zero_power http://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_zero... If you don't take the time to understand when and why you use the different definitions (undefined versus 1) then don't use it. If you need or want it, take the time to learn. The quoted article is a good general article to get you started, but it's not the final word.