Zero to the zero power
1
[0, Complex(0, 0)].each {|n|
2
say n**n
3
}
Copied!

Output:

1
1
2
1
Copied!
Taking the 0'th root of a number and raising it back to the zero power, we also get a 1:
1
say 0.root(0).pow(0) # => 1
2
say ((0**(1/0))**0) # => 1
Copied!
Last modified 1yr ago
Copy link
Contents
Output: