[go: up one dir, main page]

SelfAdjointEigenSolver return wrong eigenvalues

Hi, I use Eigen for diagonalizing large symmetric/hermitian matrices. In doing so, I noticed for some quite random situations that the results for eigenvectors/eigenvalues are wrong. The error is reproducible (at least for me). Everything up to row 207 is just to create the matrix to be diagonalized. Unfortunately, I have not yet been able to create the error for arbitrary matrices, so I cannot provide a minimal example . The matrix consists for the most part of values very close to zero (this is intentional) and is symmetrical.

That the eigenvalues are wrong can be seen if you use other eigenvalue calculations (for example numpy.linalg).

I use the Eigen headers version 3.3.9 and compile with

g++ ExactDiag_smoothwin.cpp -I Header/ -o ExactDiag_smoothwin

(the error also appears with other optimization levels)

g++ is thereby version 9.3.0

I hope I have passed all the necessary information. If I made a mistake in the description here, feel free to contact me.

Thanks in advance

ExactDiag_smoothwin.cpp