Fix check for QZ eigenvalue criterium

The criterium was previously incorrectly applied to the square absolute value of
eigenvalues. Rather apply it to the absolute value itself (as done in
mjdgges.m and the AIM solver).

Closes #1632
parent 4aa4b7f2
......@@ -28,7 +28,7 @@ double criterium;
lapack_int
my_criteria(const double *alphar, const double *alphai, const double *beta)
{
return ((*alphar **alphar + *alphai **alphai) < criterium **beta **beta);
return ((*alphar **alphar + *alphai **alphai) < criterium * criterium **beta **beta);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment