_div(i1: int, i2: int): int

Returns the integer quotient i1 / i2 (that is, the floor of the real quotient) unless it lies outside the implementation-defined range, in which case a runtime error is generated. (This is possible only if i2 is zero or if i2 is -1 and i1 is the largest implementation-defined negative number.)

_div(6, 2) == 3
_div(39, 4) == 9

_mod(i1: int, i2: int): int

Returns the integer modulus i1 % i2 (that is, the remainder from the integer division i1 / i2).  It will generate a runtime error under the same circumstances as _div(i1, i2).

_mod(10, 4) == 2
_mod(23, 8) == 7

Kenneth C. Schalk <ken@xorian.net> / Primitive Functions / Vesta SDL Programmer's Reference