The challenge
Quite simple, given an input x
, calculate it's infinite power tower!
x^x^x^x^x^x...
For you math-lovers out there, this is x
's infinite tetration.
Keep in mind the following:
x^x^x^x^x^x... = x^(x^(x^(x^(x...)))) != (((((x)^x)^x)^x)^x...)
Surprised we haven't had a "simple" math challenge involving this!*
Assumptions
x
will always converge.- Negative and complex numbers should be able to be handled
- This is code-golf, so lowest bytes wins!
- Your answers should be correct to at least 5 decimal places
Examples
Input >> Output
1.4 >> 1.8866633062463325
1.414 >> 1.9980364085457847
[Square root of 2] >> 2
-1 >> -1
i >> 0.4382829367270323 + 0.3605924718713857i
1 >> 1
0.5 >> 0.641185744504986
0.333... >> 0.5478086216540975
1 + i >> 0.6410264788204891 + 0.5236284612571633i
-i >> 0.4382829367270323 -0.3605924718713857i
[4th root of 2] >> 1.239627729522762
*(Other than a more complicated challenge here)