CoCoA:Mod

From ApCoCoAWiki

Mod

remainder 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.

Example

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

Syntax

Mod(N:INT,D:INT):INT

Div

DivAlg

GenRepr

NF

NR

   <type>integer</type>