FactChecker said:
As far as I can see, PEMDAS does not cover exponent towers.
Correct, and the reason for this is that these rules cover only precedence, but not operator associativity. That is, whether operators at the same level of precedence group together right-to-left or left-to-right.
DaveC426913 said:
The example given: 6/2(1+2) contains only the most basic applications of both, therefore PEMDAS should cover them, merely to be self-consistent.
It can't cover this example, because PEMDAS doesn't provide any guidance on how operators at the same precedence level (division and multiplication in this example) group or associate the operators: left-to-right or right-to-left. This has been my complaint about PEMDAS for a number of threads. OTOH, programming languages
do specify the associativity so that the above expression is completely unambiguous.
Here's how C or other programming languages would evaluate this expression:
##6/2\cdot3## -- parens are higher in precedence, so the expression between them is evaluated first.
##= 3 \cdot 3## -- division and multiplication are at the same precedence level, but associate (group) left to right, exactly the same as if the expression had been written as ##(6/2) \cdot 3##.
## = 9##.
Another example is 6/2/3. If we decide that the grouping should be left-to-right, we get (6/2)/3 = 3/3 = 1. If we decide that the grouping should be right to left, we get 6/(2/3) = 9.
DaveC426913 said:
Instead, the application of PEMDAS rules leads directy to an intermediate solution that cannot be unambiguously reduced without a missing rule, namely one that determines which of these is correct: 6/2(3) = a] 6/6 b] 3(3).
Right, because PEMDAS doesn't offer any guidance on how operators at the same precedence should be grouped.
DaveC426913 said:
Bonus points: If we take it a step further, and make the example say, ##6^{2^3}## then we have another undefined operation: whether the tower resolves top-down or bottom-up.
C and C++ don't have an exponentiation operator, but Python does (it uses ** for this). Its rule for associativity of the exponent operator is right-to-left, or as you put it, top-down. ##6^{2^3}## would be evaluated as ##6^8## or 1,679,616.
Although C and C++ (and several others) don't have an exponentiation operator, these languages have a bunch more operators. The precedence tables for these languages also include how these operators are grouped, several of which associate from right-to-left.