TeethWhitener said:
Wait, so does this mean that we can't write binomial coefficients inline as ##n!/k!(n-k)!## ? Because ##n!/(k!(n-k)!)## looks atrocious to me. Just my two cents.
If it's written like this, no problem: ##\frac{n!}{k!(n - k)!}##, but as you wrote it the first time, it's ambiguous.
The main problem with PEMDAS is that, IMO, it's sort of a work in progress, that hasn't been as well thought out as, say, what the computer science folks have done in specifying the precedence of operators in programming languages, and specifically the languages that stem from C. These precedence tables not only specifiy which operations should be performed before which others, they also specify the associativity of each operator, so that a + b + c should be evaluated left to right, the same as if it were written (a + b) + c. Note that on computers, addition is not necessarily associative; due to overflow or underflow, (a + b) + c might give a different result from a + (b + c).
It seems to be fairly well agreed on that for the addition and subtraction operations (the A and S in PEMDAS), the operations are at the same level of precedence and should be performed left to right.
In a footnote on the Wiki page for Order of Operations (
https://en.wikipedia.org/wiki/Order_of_operations), emeritus Berkeley math professor George M. Bergman has this to say: (
https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html)
For expressions such as a−b+c, or a+b−c, or a−b−c, there is also a fixed convention, but rather than saying that one of addition and subtraction is always done before the other, it says that when one has a sequence of these two operations, one works from left to right: One starts with a, then adds or subtracts b, and finally adds or subtracts c.
IOW, 3 + 4 - 2 should be thought of as meaning (3 + 4) - 2, yielding 5. Similarly, the expression 3 - 2 + 4 should be thought of as meaning (3 - 2) + 4, again yielding 5.
What is not well accepted is that multiplication and division (the M and D of PEMDAS) should be treated as having the same precendence, and be evaluated left to right, making these operations consistent with the treatment of addition and subtraction.
Another quote from the George Bergman footnote (italics added by me):
Presumably, teachers explain that it means "Parentheses — then Exponents — then Multiplication and Division — then Addition and Subtraction", with the proviso that in the "Addition and Subtraction" step, and likewise in the "Multiplication and Division" step, one calculates from left to right. This fits the standard convention for addition and subtraction, and would provide an unambiguous interpretation for a/bc, namely, (a/b)c. But so far as I know, it is a creation of some educator, who has taken conventions in real use, and extended them to cover cases where there is no accepted convention.
With no clear-cut convention regarding expressions with multiplication and division, particularly when written inline, you run into problems with expressions as simple as 1/2x. If we hold that multiplication and division are at the same precedence level, and should be evaluated left to right, the expression 1/2x is the same as (1/2)x. OTOH, a number of prominent textbooks, including "Course of Theoretical Physics" by Landau and Lifshitz, as well as the "Feynman Lectures on Physics" interpret 1/2x the same as ##\frac 1 {2x}##.
Another area where PEMDAS is deficient with associativity not clearly spelled out is in stacked exponents. Per this Wiki page
[PLAIN said:
https://en.wikipedia.org/wiki/Order_of_operations]Stacked[/PLAIN] exponents are applied from the top down, i.e., from right to left.
[/quote]
However, both Microsoft Office Excel and Matlab R2015B evaluate 2^3^2 (i.e., ##2^{3^2}##) as if written (2^3)^2 = 64 rather than 2^(3^2) = 512.