|
|
◆ cpqr79()
| void cpqr79 |
( |
int |
n, |
|
|
doublecomplex |
a[], |
|
|
doublecomplex |
r[], |
|
|
doublecomplex |
work[], |
|
|
int |
lwork, |
|
|
int * |
info |
|
) |
| |
Roots of a polynomial (complex coefficients) (Companion matrix eigenvalues)
- Purpose
- cpqr79 computes all roots of a polynomial p(z) with complex coefficients by computing the eigenvalues of the companion matrix.
p(z) = a0*z^n + a1*z^(n-1) + ... + an
- Parameters
-
| [in] | n | Degree of polynomial. (n >= 1) |
| [in] | a[] | Array a[la] (la >= n + 1)
Complex coefficient vector of p(z) (a0 to an). |
| [out] | r[] | Array r[lr] (lr >= n)
The obtained zeros. |
| [out] | work[] | Array work[lwork]
Work array. |
| [in] | lwork | Size of work array. (lwork >= n*(n + 11)) |
| [out] | info | = 0: Successful exit
= -1: The argument n had an illegal value (n < 1)
= -2: The argument a had an illegal value (a[0] = 0)
= -5: The argument lwork had an illegal value (lwork too small)
= 1: Failed to converge QR iteration on some eigenvalue of the companion matrix |
- Reference
- SLATEC
|