mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

Eigenvalue Calculation does not finish

Open sfetzel opened this issue 6 months ago • 4 comments

Consider the following code, which calculates the roots of the polynomial x^4 using the companion matrix eigenvalues:

var polynomial = new Polynomial(0, 0, 0, 0, 1);
var rootsReal = polynomial.EigenvalueMatrix().Evd(Symmetricity.Asymmetric).EigenValues.ToArray();
var rootsComplex = polynomial.EigenvalueMatrix().ToComplex().Evd(Symmetricity.Asymmetric).EigenValues.ToArray();

The second line calculates the roots using the eigenvalues of the real companion matrix and the last line uses the complex companion matrix.

Actual behavior The execution of the last line of code will not finish.

Expected behavior The execution should termiante and the contents of the variable rootsComplex should be equal to the contents of the variable rootsReal.

sfetzel avatar Aug 19 '24 12:08 sfetzel