Operator Precedence
The Recipe Builder provides a set of operators common to many spreadsheet programs. The following table lists the available formula operators from high to low precedence. The Recipe Builder uses the precedence of an operator to determine which operator to evaluate first. An operator with a higher precedence is evaluated first. Operators with the same precedence are evaluated in the order they occur in the formula from the left to right.
Operator | Syntax | Precedence |
( ) (parentheses) | (expression) | 1 |
- (unary minus) | - number | 2 |
All functions | See the Functions table. | 2 |
^ (exponentiation symbol) | number ^ number | 3 |
* (multiplication) | number * number | 4 |
/ (division) | number / number | 4 |
+ (addition) | number + number | 5 |
- (subtraction) | number - number | 5 |
< (less than) | number < number | 6 |
<= (less than or equal to) | number <= number | 6 |
> (greater than) | number > number | 6 |
>= (greater than or equal to) | number >= number | 6 |
!= (not equal to) | number != number | 6 |
== (equal to) | number = =number | 6 |
Changing the Order of Precedence
You can change the order in which the Recipe Builder evaluates a formula by enclosing a portion of it in parentheses. Expressions enclosed in parentheses have the highest precedence of any part of the formula.
For example, consider the formulas listed below:
Formula | Value |
5*3^2 | 45 |
(5*3)^2 | 225 |