How can you tell whether your calculator follows the standard order of operations?
Tuesday, August 26th, 2008A quick test that I use to find out if a calculator follows the standard order of operations is to enter:
1 + 2 * 3 =
If the answer is 7, then the calculator follows the standard order of operations, if the answer is 9 then it doesn’t. If no answer appears, then you are probably standing at IKEA trying to use one of the dummy calculators.
Why it works
A calculator that does not follow the standard order of operations will apply the operators (plus, times, minus, etc.) as they come. In the above example, such a calculator would first add 1 and 2 (which is 3) and then multiply the result by 3 (which is 9).
A calculator that does follow the standard order of operations will first evaluate the “priority” of all operators in a calculation and then calculate the result evaluating the higher-priority operators first. In the above example the [*] operator has a higher priority than the [+] operator. Therefore the calculator evaluates 2 * 3 first (which is 6) and then adds 1 to the result (which is 7).
The standard order of operations
The standard order of operations is a rule which states, that binary operators with a higher priority are evaluated before binary operators with a lower priority. The priorities are as follows:
- Exponents
- Multiplication/Division
- Addition/Subtraction
For more information on the order of operations see this Wikipedia article.