How do I find the value of this weird expression? How can I find the value of the expression  $\sqrt{2}^{\sqrt{2}^{\sqrt{2}^...}} $?  I wrote a computer program to calculate the value, and the result comes out to be 2 (more precisely 1.999997). Can anyone explain what's happening? Is there any general method to calculate these expressions? I am new to these problems.Thanks in advance!
EDIT
On looking at the answer by Clement C., I thought I could generalize the method to find the value of any expression of the form $\sqrt[n]{n}^{\sqrt[n]{n}^{\sqrt[n]{n}^...}} $. The value should be $n$, but this is not the case. This is the graph for $n<50$.

Any help would be appreciated.

You can rewrite your expression as $$\sqrt2^{\sqrt2^{...}}=2^{(\frac{1}{2})^{2^{...}}}$$
Clearly multiplying the powers out you end up with $$2^{1^{1^{...}}}=2$$
