Mod

This is an old revision of Mod, edited by Djzepi at . The current revision is 46965.

New page: Mod ('''mod'''ulus) divides two numbers and returns only the remainder that is a whole number. For instance, the expression "a:= 13 mod 4;" would evaluate to 1 (a=1), while "b := 12 mod 4;...

Mod (modulus) divides two numbers and returns only the remainder that is a whole number. For instance, the expression "a:= 13 mod 4;" would evaluate to 1 (a=1), while "b := 12 mod 4;" would evaluate to 0 (b=0).

Result has the same sign as dividend. For example "c:= 13 mod 4;" then c=-2