Hi Leo!



 Leockl:

one is a +ve value and the other is a -ve value.


Yes, but they’re both actually (within round-off error of being) zero.


This affects an algorithm that I am working on which groups the corresponding eigenvectors based on the +ve or -ve eigenvalues.


You have to think through what it means for your algorithm if an
eigenvalue is mathematically zero, even if the numerical computation
gives you a non-zero, but small value.
If your matrices are of order one and there is no reason that they
should have especially small eigenvalues, then it might be as simple
as deeming any eigenvalue within some multiple of round-off error
of zero to be zero and including it in neither your +ve-eigenvalue nor
-ve-eigenvalue group.
Welcome to the world of floating-point programming!
Best.
K. Frank