up previous next
remainder for integers
If N = Q*D + R, and
0 <= R < |D|, then
div(N, D)
returns Q and
mod(N, D)
returns R.
NOTE: To perform the division algorithm on a polynomial or vector, use
NR
(normal remainder) to find the remainder, or
DivAlg
to get both the quotients and the remainder.
/**/ div(10,3);
3
/**/ mod(10,3);
1
|