Given two real positive numbers $a,b\in(0,\infty)$ and a series of natural integers $n=1,2,3,\dots$, is there any known formula to apply in order to calculate the series $$s(n)=a^{b^n}?$$
My goal is not to use $\text{pow}(a,b^n)$ or exponential functions in a piece of software I'm writing.
I try to be clearer: Suppose my algorithm is
given a real positive number "a":
- for n=1,N
- sn=a^n
- use sn in some way
- end for
Nobody would implement the second line like : sn=pow(a,n) because calling pow() is time consuming. Anyone would instead code line 2 like this : sn=a*sn.
Now, unfortunately my case is more involved, as I have the following algorithm
- for n=1,N
- sn=a^(b^n)
- use sn in some way
- end for
I'm trying to find out a similar cheaper solutino to compute sn without calling pow() or exp() functions.
Thank you
renato