What is the order when doing $x^{y^z}$ and why?
Solution 1:
In the usual computer science jargon, exponentiation in mathematics is right-associative, which means that $x^{y^z}$ should be read as $x^{(y^z)}$, not $(x^y)^z$. In expositions of the BODMAS rules that are careful enough to address this question, the rule is to evaluate the top exponent first. One way to help remember this convention is to note that $(x^y)^z = x^{yz}$ (i.e., $x^{(yz)}$), so it would be silly if out of the two possibilities, $x^{y^z}$ meant the one that can be expressed without using two tiers of superscripts.
Solution 2:
Usually, a^b^c is taken to mean a^(b^c). This is purely an issue of the definition of notation so deep "why" answers aren't super likely. The main thing is that we have the identity (for positive $a$): $$(a^b)^c=a^{bc}$$ so it would make little sense to make that the default order, given that it reduces to a simpler form, whereas $a^{(b^c)}$ doesn't reduce. Moreover, generally exponentiation is written as $a^{b^c}$ rather than a^b^c, and the former notation more clearly shows that all of $b^c$ is in the exponent.
Solution 3:
I would just like to point out that many calculators share the OP's confusion, even calculators from the same manufacturer. Taking a quick sample from the lost-and-found box in my office, I found that 2^3^4 turned out to be:
- 4096 on Texas Instruments BA II Plus, TI-30XA, TI-30X II s, TI-36X solar, Windows calculator
- 2.4178...*10^24 on Texas Instruments TI-30XS MultiView, Casio fx-115ES Plus, Google search bar.
Solution 4:
The notation helps here; the exponent (which is the part that's raised) always acts like it has parentheses around it. So $x^{y^z}$ means $x^{(y^z)}$. Similarly, $x^{y+z}$ means $x^{(y+z)}$ and $x^{yz}$ means $x^{(yz)}$, even though exponentiation has higher precedence than addition or multiplication (so $x+y^z$ means $x+(y^z)$ and $xy^z$ means $x(y^z)$).
Solution 5:
Without a convention, $x^{y^z}$ might be interpreted as either $(x^y)^z$ or $x^{(y^z)}$; so a convention is useful. If the convention meant the first, then we would be obliged to use parentheses whenever we intend the second. On the other hand, if the convention means the second (which it does), then there is no need to write parentheses for the first, because it can anyway be written more simply as $x^{yz}$. The convention predates computer code, and was adopted to save writing lots of parentheses.