/
mod

mod



Function: mod

Returns the remainder after dividing a dividend by a divisor.

Syntax

mod(dividend, divisor)

ArgumentTypeDescription
dividendNumberA single number, or list of numbers, to be divided by the divisor.
divisorNumberThe number used to divide the dividend.

Examples

mod(8,7)

Returns 1

Explanation: 8 / 7 = 1 with a remainder of 1. The modulus function returns the remainder. 


mod([3,5,7],5)

Returns [3,0,2]

Explanation: 3 / 5 = 0 with a remainder of 3. The dividend 3 is not wholly divisible by the divisor 5, returning 0, therefore the remainder is 3.

See Also

Related content

mod
More like this
mod
More like this
abs
More like this
abs
More like this
abs
More like this
sqrt
More like this