X MODULO Y is the remainder from a division which produces an integral quotient and is defined as X - Y * INT(X/Y),. If one or both of the operands are REAL, the result is REAL; otherwise the result is INTEGER.
Note that MODULO is similar to MOD but gives a different result only when X/Y is negative. This is because MODULO uses the formula X - Y * INT(X/Y), whereas MOD uses X - Y * (X DIV Y). This means when X/Y is negative INT(X/Y) converts to integer by truncation toward negative infinity, whereas (X DIV Y) in MOD converts to integer by truncation toward zero.