CoCoA:Mod

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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>