the.com/precedence
The grammar rule that decides whether you add or multiply your way to being wrong.
means The rule for which operation gets to go first when a calculation has several competing ones waiting their turn.
from From Latin praecedere, 'to go before' — prae ('before') plus cedere ('to go, to yield'). The same root gives us 'precede' and 'predecessor'; precedence is simply the question of who yields and goes first in line, applied to plus signs and parentheses instead of people.
- PEMDAS myth
- Multiplication and division are actually equal rank, left to right
- coding gotcha
- Bitwise ops rank below comparisons, breaking flags silently
- etymology
- From Latin praecedere, to go before, literally
- excel trap
- Unary minus beats exponent, so -2^2 equals -4