# naginterfaces.library.zeros.poly_​complex_​fpml¶

naginterfaces.library.zeros.poly_complex_fpml(a, itmax=30, polish=1)[source]

poly_complex_fpml finds all the roots of a complex polynomial equation, using a fourth-order convergent modification of Laguerre’s method.

For full information please refer to the NAG Library document for c02aa

https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/c02/c02aaf.html

Parameters
acomplex, array-like, shape

must contain the coefficient of , for .

itmaxint, optional

The maximum number of iterations to be performed.

polishint, optional

Specifies the polishing technique used to refine root approximations.

No polishing.

Single iteration of Newton’s method.

Iterative refinement using the compensated Horner’s method.

Returns
zcomplex, ndarray, shape

holds the approximation of the root , for .

berrfloat, ndarray, shape

holds the relative backward error, , for .

condfloat, ndarray, shape

holds the condition number, , for .

convint, ndarray, shape

indicates the convergence status of the root approximation, , for .

Successfully converged after iterations.

Failed to converge after iterations.

Overflow was encountered.

Note: if , refers to convergence in the compensated polishing process.

Raises
NagValueError
(errno )

On entry, the complex variable .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , or .

(errno )

Convergence has failed for at least one root approximation.

(errno )

poly_complex_fpml encountered overflow during at least one root approximation.

Notes

poly_complex_fpml attempts to find all the roots of the th degree complex polynomial equation

The roots are located using a modified form of Laguerre’s method, as implemented by Cameron (2018). An implicit deflation strategy is employed, which allows for high accuracy even when solving high degree polynomials. Linear () and quadratic () problems are obtained via the ‘standard’ closed formulae.

First, initial estimates of the roots are made using a method proposed by Bini (1996), which selects complex numbers along circles of suitable radii. Updates to each root approximation , for , are then made using the iterative formula from Petković et al. (1997):

where

The nearest to the current approximation is used, by selecting the sign that maximizes the denominator of the correction term. The subtraction of the sum terms when computing and determines the implicit deflation strategy of the modified Laguerre method.

The relative backward error of a root approximation is given by

where is the perturbed polynomial

A root approximation is deemed to have converged if machine precision, at which point updates of that root cease. If the stopping criterion holds, then the computed root is the exact root of a polynomial whose coefficients are no more perturbed than the floating-point computation of .

The condition number of each root is also computed, as a measure of sensitivity to changes in the coefficients of the polynomial. It is given by

Root approximations can be further refined with optional ‘polishing’ processes. A simple polishing process is provided that carries out a single iteration of Newton’s method, which proves quick yet often effective. Alternatively, a compensated polishing process from Cameron and O’Neill (2019) can be applied. This iterative method combines the implicit deflation of the modified Laguerre method, with the accuracy of evaluating polynomials and their derivatives using the compensated Horner’s method from Graillat et al. (2005). Compensated polishing yields approximations with a limiting accuracy as if computed in twice the working precision.

It is recommended that you read Selecting a Polishing Process for advice on selecting an appropriate polishing process.

References

Bini, D A, 1996, Numerical computation of polynomial zeros by means of Aberth’s method, Numerical Algorithms (13), 179–200, Springer US

Cameron, T R, 2018, An effective implementation of a modified Laguerre method for the roots of a polynomial, Numerical Algorithms, Springer US, https://doi.org/10.1007/s11075-018-0641-9

Cameron, T R and O’Neill, A, 2019, On a compensated polishing technique for polynomial root solvers, To be published,

Graillat, S, Louvet, N, and Langlois, P, 2005, Compensated Horner scheme, Technical Report, Université de Perpignan Via Domitia

Petković, M, Ilić, S, and Tričković, S, 1997, A family of simultaneous zero-finding methods, Computers & Mathematics with Applications (Volume 34) (10), 49–59, https://doi.org/10.1016/S0898-1221(97)00206-X

Wilkinson, J H, 1959, The evaluation of the zeros of ill-conditioned polynomials. Part I, Numerische Mathematik (Volume 1) (1), 150–166, Springer-Verlag