## FZ_ROOTS

The FZ_ROOTS function is used to find the roots of an m -degree complex polynomial, using Laguerre's method. The result is an m -element complex vector.

FZ_ROOTS is based on the routine ``` zroots``` described in section 9.5 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission.

### Calling Sequence

Result = FZ_ROOTS( C )

### Arguments

#### C

A vector of length m +1 containing the coefficients of the polynomial, in ascending order (see example). The type can be real or complex.

### Keywords

#### DOUBLE

Set this keyword to force the computation to be done in double-precision arithmetic.

#### EPS

The desired fractional accuracy. The default value is 2.0  ¥  10 -6 .

#### NO_POLISH

Set this keyword to suppress the usual polishing of the roots by Laguerre's method.

### Examples

EXAMPLE 1:" Real coefficients yielding real roots.

P ( x ) = 6 x 3 - 7 x 2 - 9 x - 2 (The exact roots are -1/2, -1/3, 2.0)

coeffs = [-2.0, -9.0, -7.0, 6.0]

roots = FZ_ROOTS(coeffs)

PRINT, roots

( -0.500000, 0.00000)( -0.333333, 0.00000)( 2.00000, 0.00000)

EXAMPLE 2: Real coefficients yielding complex roots.

P ( x ) = x 4 + 3 x 2 + 2

(The exact roots are:

,
,
,

coeffs = [2.0, 0.0, 3.0, 0.0, 1.0]

roots = FZ_ROOTS(coeffs)

PRINT, roots

(0.00000, -1.41421)(0.00000, 1.41421)

(0.00000, -1.00000)(0.00000, 1.00000)

EXAMPLE 3: Real and complex coefficients yielding real and complex roots.

P ( x ) = x 3 + (-4 - i 4) x 2 +s (-3 + i 4) x + (18 + i 24)

(The exact roots are -2.0, 3.0, (3.0 + i 4.0))

coeffs = [COMPLEX(18,24), COMPLEX(-3,4), COMPLEX(-4,-4), 1.0]

roots = FZ_ROOTS(coeffs)

PRINT, roots

( -2.00000, 0.00000) ( 3.00000, 0.00000) ( 3.00000, 4.00000)