LP class

LP class

This class represents Laurent polynomials with terms of integer (positive or negative) powers and rational coefficients.

The polynomial Axn +Bxn+1 + Cxn+2 ....... +Qxn+p is represented by

Constructors

You can construct LPs explicitly with any of the following constructors.

For example, new LP([1,1]) would define the polynomial 1+x.

new LP(4,[1,3,3,1]) would define the polynomial (1+3x+3x2+x3)/4

Arithmetic

The following methods are provided for carrying out arithmetic on LPs. They are expressed as methods of a current LP, and take another LP as argument.

Norms

The following functions return useful properties of the polynomial.

Other Operations

Conventions

Rational scalars are represented as polynomials of just one term, with n=0.

The unit polynomial is represented as a rational scalar with its numerator equal to its denominator.

The zero polynomial is represented as a rational scalar with a zero numerator. (not as an empty polynomial with no terms.)

Notes