Modifier and Type | Method and Description |
---|---|
static Complex[] |
findRoots(Complex[] coeffs)
Finds the zeros of a complex polynomial.
|
static Complex[] |
findRoots(double[] coeffs)
Finds the zeros of a real polynomial.
|
public static Complex[] findRoots(double[] coeffs)
findRoots()
is called.coeffs
- The polynomial coefficients in order of decreasing powers.public static Complex[] findRoots(Complex[] coeffs)
The polynomial has the form:
coeffs[0] * x^n + coeffs[1] * x^(n-1) + ... coeffs[n-1] * x + coeffs[n]
coeffs
- The polynomial coefficients in order of decreasing powers.