Skip to content

Polynomial

A object that represents a polynomial.


properties

coef : ndArray

the coefficients of the polynomial in ascending order of degree.

domain : {number}

the scaled domain of the polynomial

window : {number}

the scaled window of the polynomial

symbol : string

the symbol of the polynomial


methods

degree -> ()

Polynomial:degree(

): number

returns the degree of the polynomial.

cutdeg -> ()

Polynomial:cutdeg(
    degree : number
): Polynomial

returns a copy of the polynomial thats trimmed to the degree degree.

copy -> ()

Polynomial:copy(

): Polynomial

returns a copy of the polynomial.

deriv -> ()

Polynomial:deriv(

): Polynomial

returns the derivative of the polynomial.

integ -> ()

Polynomial:integ(

): Polynomial

returns the antiderivative of the polynomial.

trim -> ()

Polynomial:trim(

): Polynomial

returns a copy of the polynomial without leading tols (tol being defaulted to 0).

companion -> ()

Polynomial:companion(

): ndArray

returns the companion matrix of the Polynomial.

roots -> ()

Polynomial:roots(

): ndArray

returns the roots the polynomial as a ndArray.