# Calculate an Exponential Tower

Calculator for exponential towers. An exponential tower is a sequence of exponentiations, like a_{1} to the power of (a_{2} to the power of (a_{3} to the (...))). The single steps are determined by a sequence, this can also simply be a number. As running variable, which is increased by 1 in each step, i is used. Only this variable may occur in the formation sequence. The basic arithmetic operations + - * / are allowed, as well as the power function, like pow(2#i) for 2^{i}. Further allowed functions are sin(), cos(), tan(), asin(), acos(), atan(), log() for the natural logarithm and abs() for the absolute value. Also, the constants e and pi can be used. If every step is a number larger than 1, the result will get very big very quickly. If one step is negative and its exponential is an even root, the value and its following values can't be calculated.

**Exponential Tower**

a

_{n}

...

a

_{3}

a

_{2}

a

_{1}

The exponentiation is calculated from top to bottom, so a_{n-1} to the power of a_{n}, then a_{n-2} to the power of the previous result, and so on, until a_{1} to the power of ...

If the formation sequence is a number a and m=1, the exponential tower can be written in Knuth's up-arrow notation as a ↑↑ n.

Examples:

**a**2 ↑↑ 2 = 4; 2 ↑↑ 3 = 16 and 2 ↑↑ 4 = 65536. For the next value, the result will be so big that_{i}= 2:*Infinity*is shown. 2 ↑↑ 5 would have 19728 places.**a**This exponential tower slowly converges to the value 2.5233822195973..._{i}= 1.715*abs(sin(x)):