Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 216 of 271)
 
 
Arithmetic Operators
 
The following list shows the available arithmetic operators.
 
Operator and Operation
+  addition
-  subtraction
*  multiplication
**  exponent
⁄  division
DIV  integer division
MOD  remainder
 
 
Note:   The value of A DIV B is the mathematical quotient of A⁄B with any fractional portion or
remainder dropped.
 
Examples:
  3⁄2 = 1.5  3 DIV 2 = 1
  24⁄5 = 4.8  24 DIV 5 = 4
  72⁄8 = 9.0  72 DIV 8 = 9
  5.46⁄2.1 = 2.6  5.46 DIV 2.1 = 2
 
The MOD returns the remainder obtained by dividing its two numbers.
3 MOD  2 = 1  remainder = 1
24 MOD  5 = 4  remainder = 4
72 MOD  8 = 0  remainder = 0
3.57 MOD 2.1 = 1.47 Fract (3.57 ÷ 2.1 =.7)
(.7 x 2.1 = 1.47)