Arithmetic Operators — (+, -,
*, /,
%)
number + number
number - number
number * number
number / number
number % number
numberAny integer or real number. Non-numbers are treated as zero.
The mathematical result of the operation.
These operators perform simple mathematical operations on their arguments.
+ gives the sum of the two arguments.
- gives the difference between the first and second arguments.
* gives the product of the two arguments.
/ gives the first argument divided by the second argument.
% gives the modulus of the first argument by the second, that is, the remainder of the integer division of the first argument by the second.
Gamma>5 + 6;11Gamma>12 / 5;2.3999999999999999112Gamma>div(12,5);2Gamma>19 % 5;4Gamma>