ZPOCC
Finds the zeros of a polynomial with complex coefficients.
Required Arguments
COEFF — Complex vector of length NDEG + 1 containing the coefficients of the polynomial in increasing order by degree. (Input)
The polynomial is
COEFF(NDEG + 1) * Z**NDEG + COEFF(NDEG) * Z**(NDEG – 1) + … + COEFF(1).
ROOT — Complex vector of length NDEG containing the zeros of the polynomial. (Output)
Optional Arguments
NDEG Degree of the polynomial. 1  NDEG < 50 (Input)
Default: NDEG = size (COEFF,1) - 1.
FORTRAN 90 Interface
Generic: CALL ZPOCC (COEFF, ROOT [])
Specific: The specific interface names are S_ZPOCC and D_ZPOCC.
FORTRAN 77 Interface
Single: CALL ZPOCC (NDEG, COEFF, ROOT)
Double: The double precision name is DZPOCC.
Description
Routine ZPOCC computes the n zeros of the polynomial
p(z) = anzn + an-1zn-1 + + a1z + a0
where the coefficients ai for i = 0, 1, n are complex and n is the degree of the polynomial.
The routine ZPOCC uses the Jenkins-Traub three-stage complex algorithm (Jenkins and Traub 1970, 1972). The zeros are computed one at a time in roughly increasing order of modulus. As each zero is found, the polynomial is deflated to one of lower degree.
Informational errors
Type
Code
Description
3
1
The first several coefficients of the polynomial are equal to zero. Several of the last roots will be set to machine infinity to compensate for this problem.
3
2
Fewer than NDEG zeros were found. The ROOT vector will contain the value for machine infinity in the locations that do not contain zeros.
Example
This example finds the zeros of the third-degree polynomial
p(z) = z3 - (3 + 6i)z2 - (8 - 12i)z + 10
where z is a complex variable.

USE ZPOCC_INT
USE WRCRN_INT

IMPLICIT NONE
! Declare variables
INTEGER NDEG
PARAMETER (NDEG=3)
!
COMPLEX COEFF(NDEG+1), ZERO(NDEG)
! Set values of COEFF
! COEFF = ( 10.0 + 0.0i )
! ( -8.0 + 12.0i )
! ( -3.0 - 6.0i )
! ( 1.0 + 0.0i )
!
DATA COEFF/(10.0,0.0), (-8.0,12.0), (-3.0,-6.0), (1.0,0.0)/
!
CALL ZPOCC (COEFF, ZERO)
!
CALL WRCRN ('The zeros found are', ZERO, 1, NDEG, 1)
!
END
Output

The zeros found are
1 2 3
( 1.000, 1.000) ( 1.000, 2.000) ( 1.000, 3.000)