mod

Modulus after division.

Syntax

  • C = mod(A, B)

Input argument

  • A - a variable: dividend

  • B - a variable: divisor

Output argument

  • C - result of mod(A, B)

Description

C = mod(A, B) computes the modulo of A and B, i.e : A - B .* floor (A ./ B).

This function manages also negative values.

Example

mod (-1, 3)

See also

rem, floor.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated