The mod function returns the remainder when num is divided by div.
The mod function may give unexpected results when num or div is fractional because most fractional numbers cannot be precisely represented by a finite-precision floating-point value.
See Also
trunc, gcd