Question

I was playing around with ** operator, and noticed that:

0**0 == 1

And

pow(0, 0) == 1

And even math:

math.pow(0, 0) == 1

And Google! (search for 0**0)

Why is it so? As far as I know 0**0 is undefined

Was it helpful?

Solution

No, you are mistaken. It works as it should.

n/0 is undefined. 0**0 however is 1 because any number raised to the power of 0 is 1.

Here are some references:

http://mathforum.org/dr.math/faq/faq.number.to.0power.html

https://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_power_of_zero

OTHER TIPS

Anything to the power 0, by definition, is 1.

Because of the math rules. Everything in a 0-th power is 1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top