naginterfaces.library.zeros.poly_​real_​fpml

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

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

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/c02/c02abf.html

Parameters
afloat, 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.

See also Selecting a Polishing Process.

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 real 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_real_fpml encountered overflow during at least one root approximation.

Notes

poly_real_fpml attempts to find all the roots of the th degree real polynomial equation

The roots are located using a modified form of Laguerre’s method, as implemented by Cameron (2018).

poly_real_fpml is a wrapper around the corresponding complex routine poly_complex_fpml().

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