mod


mod(r1, r2)
      

Return the remainder of the real numbers r1 and r2. The result has the same sign as r2.

Examples:


mod(34, 3)
// 1
mod(34.23, 3.333)
// .8999999999999986
mod(34.23, -3.333)
// -2.433000000000007
mod(-34.23, 3.333)
// 2.433000000000007
      

Also see:

rem
quo
div
modulo
remainder
quotient


Core Module Index | Contents