Open
Description
var polynomialCoefficients = new double[]
{
1.19469367e+21, 1.67924808e+16, 3.97850921e+10, 1.39471145e+00, 1.56417732e-07
};
var polynomial = new Polynomial(polynomialCoefficients);
The result of polynomial.Roots()
will return the following roots:
[0]: {(-4458290,732664504, 504313068,0086204)}
[1]: {(-4458290,732664504, -504313068,0086204)}
[2]: {(0, 0)}
[3]: {(0, 0)}
Using octave:
roots([1.56417732e-07, 1.39471145e+00, 3.97850921e+10, 1.67924808e+16, 1.19469367e+21])
The expected roots are:
(-4247248.3831557, 5.04311305e+08),
(-4247248.3831557, -5.04311305e+08),
(-331498.88729568, 0),
(-90585.83564952, 0)
My current workaround is:
Evd<Complex> eigen = polynomial.EigenvalueMatrix().ToComplex().Evd(Symmetricity.Asymmetric);
var roots = eigen.EigenValues;
However, these roots are not 100% complex conjugated.
Metadata
Metadata
Assignees
Labels
No labels