up previous next
quotient for integers
We define the quotient
Q
and remainder
R
to be integers which
satisfy
N = Q*D + R with
0 <= R < |D|.
Then
div(N, D)
returns
Q
while
mod(N, D)
returns
R
.
NOTE: To perform the division algorithm on a polynomial
use
NR
(normal remainder) to find the remainder,
or
DivAlg
to get both quotients and remainder.
To determine if a polynomial is in a given ideal or a vector is in a
given module, use
NF
or
IsIn
, and to
find a representation in terms of the generators
GenRepr
.
/**/ div(10,3);
3
/**/ mod(10,3);
1
|