Symbol class: Mathematics, Arithmetics, Logic and Comparisons

Syntax:

Symbol type: function

Argument description:

number | real number |

divisor | real number |

MOD function returns modulus of two integer arguments. Non-integer arguments are first turned into integers by floor operation. Note that division by zero invokes DIVISION-BY-ZERO condition.

(mod -1 5) => 4 (mod 13 4) => 1 (mod -13 4) => 3 (mod 13 -4) => -3 (mod -13 -4) => -1 (mod 13.4 1) => 0.4 (mod -13.4 1) => 0.6