The mod function returns the remainder of the result of dividing its first argument by its second argument (assuming that the result of division must be an integer). It returns an integer if both arguments are integers, otherwise it returns a float.
Syntax
(mod <numeric-expression> <numeric-expression>)
Example
CLIPS> (mod 5 2) 1 CLIPS> (mod 3.7 1.2) 0.1 CLIPS>