idiv(n, m)
is integer division, with the same effect as
n %/% m
. mod(n, m)
is the modulo operator and returns $n\,mod\,m$.
mod(n, 0)
is n
, and the result always has the same sign
as m
.
rem(n, m)
is the same modulo operator and returns $n\,mod\,m$.
mod(n, 0)
is NaN
, and the result always has the same sign
as n
.