|
|
◆ dka()
| void dka |
( |
int |
n, |
|
|
doublecomplex |
a[], |
|
|
doublecomplex |
r[], |
|
|
int |
maxiter, |
|
|
int * |
iter, |
|
|
doublecomplex |
work[], |
|
|
double |
rwork[], |
|
|
int * |
info |
|
) |
| |
Roots of a polynomial (complex coefficients) (3rd order DKA method)
- Purpose
- dka computes all roots of a polynomial p(z) with complex coefficients by 3rd order DKA (Durand-Kerner-Aberth) method.
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. |
| [in] | maxiter | Maximum number of iterations. (maxiter >= 1) |
| [out] | iter | Number of iterations required to converge. |
| [out] | work[] | Array work[lwork] (lwork >= n + 1)
Work array. |
| [out] | rwork[] | Array rwork[lrwork] (lrwork >= n + 1)
Work array. |
| [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)
= -4: The argument maxiter had an illegal value (maxiter <= 0)
= 1: Failed to converge after maxiter iterations |
- Reference
- (Japanese book) Masatake Mori "FORTRAN77 Numerical Calculation Programming (augmented edition)" Iwanami Shoten (1987)
|