The following is the documentation for binary arithmetic operators. The binary arithmetic operators are of the form: x = a <operator> b
or x = <operator name>(a, b)
.
The documentation includes references to exceptions and relaxations.
For more information on exceptions, see exceptions.
For more information on relaxations, see relaxations.
All operations result in a decimal number type with 15 digits. The mathematics of this is covered in the section on the Decimal Number Type.
Syntax: x = a + b
Description: Sets x to the sum of a and b.
Exceptions:
Relaxations:
Syntax: x = a - b
Description: Sets x to the difference between a and b.
Exceptions:
Relaxations:
Syntax: x = a * b
Description: Sets x to the product of a and b.
Exceptions:
Relaxations:
Syntax: x = a / b
Description: Sets x to a divided by b.
Exceptions:
Relaxations:
Syntax: x = a ^ b
Description: Sets x to a to the power of b.
Exceptions:
Relaxations:
Syntax: x = a mod b
Description: Sets x to the reminder of a divided by b with integer division. The result is 0 <= x < b
. Another way at looking at it is that x = a - q*b
, where q is the integer quotient when a is divided by b using integer division.
Exceptions:
Relaxations:
Syntax: x = max(a, b)
Description: x is set to the larger of a and b.
Syntax: x = min(a, b)
Description: x is set to the smaller of a and b.
We would be more than happy to help you. Our opening hours are 9–15 (CET).
📞 (+47) 93 68 22 77
Nils Bays vei 50, 0876 Oslo, Norway