Arithmetic operators

Please note that operators listed first are ‘stronger’ than the later ones, e.g. multiplication is stronger than addition.

After all, 2 + 3 * 4 equals 14; if addition had been stronger (or equally strong) it would have been 20.

Operator

Description

-

Unary minus, negates the expression, e.g. -5.

^

Power, e.g. 5 ^ 2 = 25, and 25 ^ 0.5 = 5.

*, /, %

Multiplication, division and a new division operator, which simply divides and then multiplies the result by 100.

+, -

Addition and subtraction

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.