DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > REPROOT

 

REPROOT

Purpose:

Checks for repeated roots of a polynomial.

Syntax:

REPROOT(p, findroots, tol)

p

-

A series, the coefficients of the polynomial in descending powers (highest order to lowest).  If findroots is 0, p represents the roots of the polynomial.

findroots

-

Optional. An integer, the form of input series p:

0:

p contains the polynomial roots

1:

p contains the polynomial coefficients and the roots are computed (default)

tol

-

Optional. A real, the tolerance threshold to determine repeated roots. Defaults to 1e-3.

Returns:

An integer. 1 if repeated roots exist else 0.

Example:

 

reproot({1, 3, 3, 1})

 

returns 1, indicating the polynomial has multiple roots.

Example:

 

reproot(poly({1, 1, 2}))

 

returns 1, indicating the polynomial has multiple roots.

Remarks:

REPROOT is a support routine used by RESIDUE and RESIDUEZ.

See Also:

POLY

POLYROOT

POLYSTAB

RESIDUE

RESIDUEZ