Is there any generally accepted or written rule specifying the interpretation of a multi-exponent expression written in this simple style (by user, no latex): x^y^z?
It leads to different results on different engines: e.g. 5^2^3 can be interpreted as:
- $5^{2^3}$
$5^{2^3}$= 390625 - or as ${5^2}^3$
${5^2}^3$= 15625 (see that interpreted notation on Math StackExchange seems almost the same)
Interpretation examples:
Interpretation of Google, WolframAlpha, Bing, Yahoo is right associative: $x^{y^z}$
Interpretation of Windows Calculator / Samsung Calculator / Mac Spotlight is the second one (left associative): ${x^y}^z$ (equals to $x^{y \cdot z}$)
On my CASIO fx-85ES calculator when I click [num] [pow] [num] [pow] [num] result is the first one: $x^{y^z}$
Now I see on Math StackExchange that if I write $x^y^z$ it will raise an error "Double exponent: use braces to clarify".
However I do not know any other latex validator which will raise an error like this.
My observation so far shows that most search engines choose the first way $x^{y^z}$ and most calculator apps choose the second way as sequential interpreting from left to right $x^{y^z}$.
According to Wikipedia Operator associativity page: "...for an exponentiation operator (if present) [source] and Knuth's up-arrow operators there is no general agreement."
There is a list of implementations (right- vs left-associative) across computer languages, available in the source that Wikipedia mentions.
Comparative table:
x^y^zcan be also written as $x\uparrow y\uparrow z$. In both cases, the interpretation is ambiguous.Because we can rewrite the statement after left-assoc. interpretation ${x^y}^z$ as $x^{y \cdot z}$ we can assume that this behavior is not what a regular user wants because he can write directly $x^{y \cdot z}$. From this point of view, it seems that right-associative approach is "better". I do not say more correct because we have no general rule/agreement for that.
There is also a mnemonics called PEMDAS/BEDMAS/BODMAS/BIDMAS (depends in countries). It calls us we should solve Brackets > Orders (e.g. powers, square roots) > Division > Multiplication > Addition > Subtraction. According to this mnemonics we should proceed from top to down for powers (right-association).
Negation vs exponentiation
There is also one more important problem you can face in this context: variable negation or exponentiation first? [source]
Comparative table:
Conclusion
However it seems that the right-associative approach has more logical bases, we do not have any official rule that says it is right/wrong approach.
So since you know that a definition of the notation is missing, you should always use braces (as StackExchange parser also recommends) to avoid unexpected results.