Order of Operations

"Please excuse my dear Aunt Sally" —Anonymous

To figure out order of operations, the calculator divides all the operations into 15 priority levels. When evaluating an expression, everything on one priority level is simplified (usually, going from left to right) before moving on to the next.

Of course, everything inside parentheses, brackets, and braces is simplified first.

 Priority Level Operations on that level 1 Everything inside parentheses ( ), brackets [ ], and braces { } 2 Indirection (#)1 3 Function calls: everything with its own parenthesis, e.g. sin() 4 Operators that go after their operand, e.g. T This also includes taking elements from lists and matrices with [ ] 5 Exponentiation (^, .^)2 6 Negation (-) 7 String concatenation (&) 8 Multiplication and division (*, /, .*, ./) 9 Addition and Subtraction (+, -, .+, .-) 10 Equality relations: (=, ≠, >, ≥, <, ≤) 11 Logical and arithmetic not3 12 Logical and arithmetic and 13 Logical and arithmetic or, xor 14 Constraint "with" operator (|) 15 Store (→)