Index
Arithmetic

mod

<-a <-b mod ->result

Description

Perform integer division and returns the value (modulo) of the difference.

Examples

trace(5 3 mod) #prints '2'
Note:

For floating-point values, in the case of x % y if x and y are positive finite values.

z is the result of x % y and is computed as x – n * y, where n is the largest possible integer that is less than or equal to x / y.

See Also

Index