CoCoA:Div

From ApCoCoAWiki

Div

quotient for integers

Description

If N = Q*D + R, and <formula>0 <less_eq/> R < |D|</formula>, then Div(N,D) returns Q and

Mod(N,D) returns R.

NOTE: To perform the division algorithm on a polynomial or vector, use

<ttref>NR</ttref> (normal remainder) to find the remainder, or <ttref>DivAlg</ttref> to get both

the quotients and the remainder. To determine if a polynomial is in a given ideal or a vector is in a given module, use <ttref>NF</ttref> or <ttref>IsIn</ttref>, and to find a representation in terms of the generators use <ttref>GenRepr</ttref>.

Example

  Div(10,3);
3
-------------------------------
  Mod(10,3);
1
-------------------------------

Syntax

Div(N:INT,D:INT):INT

DivAlg

GenRepr

NF

NR

Mod

   <type>integer</type>