Created attachment 573 [details] Test code to demonstrate the bug Using the SelfadjointEigenSolver for a multiple of the 2x2 fixed-size identity matrix gives correct eigenvalues, but eigenvectors full of 'nan'. In the routine in 'src/Eigenvalues/SelfAdjointEigenSolver.h' there are specialised routines for 3x3 and 2x2 matrices. In the 3x3 case there is a check for equal eigenvalues if((eivals(2)-eivals(0))<=Eigen::NumTraits<Scalar>::epsilon()) { eivecs.setIdentity(); } else { // really compute the eigenvectors } , but in the routine for 2x2 this check is missing. It follows a division by zero in the normalisation of the vectors.
Created attachment 574 [details] Patch
thank you for the report, the fix is slightly more subtle, I'll push a fix soon.
https://bitbucket.org/eigen/eigen/commits/61200705ea0f/ https://bitbucket.org/eigen/eigen/commits/3d34914875ea/
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1013.