next up previous contents
Next: Integer lists Up: Input Syntax Previous: Integer Expressions

Polynomial expressions

 

The syntax for polynomial expressions is similar to integer expressions.

The legal operators for polynomials, in order of increasing precedence, are given in the following table.

The polynomial division and remainder are done using the defined monomial order in the base ring. Parentheses are used to enforce groupings in an expression.

The following remarks describe certain aspects of polynomial expressions.

For example,

%  poly f (x[1]+x[2])^2

%  type f
; x[1]2+2x[1]x[2]+x[2]2 

%  int i 1

%  poly g (x[i]-x[i+1])^2*{f}

%  type g
; x[1]4-2x[1]2x[2]2+x[2]4 

%  poly h ab2+c2d+a(b+c)(b-c)

%  type h
; 2ab2-ac2+c2d


next up previous contents
Next: Integer lists Up: Input Syntax Previous: Integer Expressions

Sorin Popescu
Fri Feb 14 17:37:19 EST 1997