public final class PolynomialRootsFinder extends Object
In this solver, the roots of the polynomial are calculated by computing the eigenvalues of the companion matrix A:
A = diag(ones(n-1, 1), -1); A(1,:) = -p(2:n+1)./p(1); r = eig(A);
The results produced are the exact eigenvalues of a matrix within roundoff error of the companion matrix, A. However, this does not mean that they are the exact roots of a polynomial whose coefficients are within roundoff error of those in p.
| Modifier and Type | Method and Description |
|---|---|
static Complex[] |
findRootsComplexPolynomial(double[] coefficients)
Given a list of coefficients of a polynomial (in decreasing order of degree), this method computes its COMPLEX
roots.
|
static double[] |
findRootsRealPolynomial(double[] coefficients)
Given a list of coefficients of a polynomial (in decreasing order of degree), this method computes its REAL
component of the roots.
|
public static double[] findRootsRealPolynomial(double[] coefficients)
coefficients - List of coefficients of the polynomial (in decreasing order).public static Complex[] findRootsComplexPolynomial(double[] coefficients)
coefficients - List of coefficients of the polynomial (in decreasing order).Copyright © 2025 CNES. All rights reserved.