Operator Precedence |
Calculations in the calculator follow a specific operator precedence order within expressions. When multiple operators are combined in a single expression, the calculator executes the operations according to the defined order of precedence.
If an expression contains operators with the same precedence level, the evaluation proceeds from left to right.
To manually control the order of evaluation, use parentheses to group parts of the expression you want calculated first.
For example:
▸ The expression 5 + 2 × 3 returns 11, because multiplication takes precedence over addition.
▸ However, (5 + 2) × 3 returns 21, because the operation within the parentheses is calculated first.
Order | Operator | Explanation |
1 | ( ) |
Parentheses: Promotes the evaluation order of the enclosed part. ▸ 2 + 4 × 3 = 14 ▸ (2 + 4) × 3 = 18 |
2 | ^ | Power ▸ 2^3×10 is evaluated as (2^3)×10 not as 2^(3×10) ▸ -3^2 is evaluated as -(3^2) and not as (-3)^2 |
ȧ Ⱥ ȳ |
▸ -5² is evaluated as -(5²) and not as (-5)² | |
√ | Root, Square Root | |
3 | Postfix Operators: | |
% | Percentage | |
! | Factorial |
|
4 | - |
Unary Minus
This operator changes the sign of its argument from positive to negative and vice versa. |
5 | × | Multiplication |
/ | Division | |
mod | Modulo | |
nPr, nCr | Permutations, Combinations | |
∠ | Polar Operator (r ∠ θ) |
|
6 | + | Additional |
- | Subtraction |
|
7 | Bitwise Shifts And Rotation: | |
<< | SHLn (Arithmetic Left-Shift) | |
>> | SHRn (Arithmetic Right-Shift) | |
>>> | USHRn (Logical Right-Shift) | |
ƥ | ROLn (Logical left-rotate) | |
Ʀ | RORn (Logical right-rotate) |
|
8 | Ɩ | Bitwise AND |
ƚ | Bitwise NAND |
|
9 | Ƙ | Bitwise XOR |
Ƨ | Bitwise XNOR |
|
10 | Ɨ | Bitwise OR |
ƛ | Bitwise NOR |
Functions |
Functions can generally be entered without parentheses when passing numbers, although some cases require their use. The examples below illustrate how to pass parameters to functions with and without parentheses.
Examples:
Complex Number |
The evaluation of the imaginary unit 'i' in a complex number is performed using a multiplication operation.
Examples: