Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

sgeev giving incorrect results

fantaman
Beginner
570 Views

Hi.

 

Just compiling the LAPACK examples of 2025.3 on Visual Studio. I'm getting wrong output eigenvectors for sgeev by column. The same example run with dgeev (by column) is correct. The only difference should be float vs double, but output changes. I checked the calcs and sgeev is wrong. The first (and therefore second too) left eigenvector has the opposite sign, the first and third right eigenvectors (and therefore second and fourth too) the same. The rest is correct.

It cannot be the way parameters are passed, dgeev would be wrong too.

Output attached.

 

Thank you

0 Kudos
1 Solution
Fengrui
Moderator
465 Views

Flipping the sign of a (right) eigenvector still gives a (right) eigenvector with the same eigenvalue, A(-v)=-Av=-\lambda v=\lambda (-v). That's also true for left eigenvectors.

View solution in original post

0 Kudos
2 Replies
Fengrui
Moderator
466 Views

Flipping the sign of a (right) eigenvector still gives a (right) eigenvector with the same eigenvalue, A(-v)=-Av=-\lambda v=\lambda (-v). That's also true for left eigenvectors.

0 Kudos
fantaman
Beginner
406 Views

I need to refresh my maths!

0 Kudos
Reply