Home Online Manual
Top
Back: zeroset_lib
Forward: remainder
FastBack: ntsolve_lib
FastForward: signcond_lib
Up: zeroset_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.8.6.1 Quotient

Procedure from library zeroset.lib (see zeroset_lib).

Usage:
Quotient(f, g); where f,g are polynomials;

Purpose:
compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < deg(g)

Return:
list of polynomials
 
  _[1] = quotient  q
  _[2] = remainder r

Assume:
basering = Q[x] or Q(a)[x]

Note:
This procedure is outdated, and should no longer be used. Use div and mod instead.

Example:
 
LIB "zeroset.lib";
ring R = (0,a), x, lp;
minpoly = a2+1;
poly f =  x4 - 2;
poly g = x - a;
list qr = Quotient(f, g);
qr;
==> [1]:
==>    x3+(a)*x2-x+(-a)
==> [2]:
==>    0
qr[1]*g + qr[2] - f;
==> 1