up previous next
div --
quotient for integers
|
This function computes the integer quotient of
N divided by
D;
it is equal to
N/Drounded towards zero.
The companion function
mod
computes the corresponding remainder.
If we set
Q = div(N,D) and
R = mod(N,D) then
N = Q*D + R.
NOTE: for polynomials use
NR
(remainder),
DivAlg
(quotients and remainder),
IsIn
(ideal membership).
/**/ div(10,3);
3
/**/ div(10,-3);
-3
|