Skip to content
Snippets Groups Projects
Verified Commit 8ebcd7ca authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Dynare++: 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 now done in
Dynare).

Ref #1632
parent 2a821773
Branches
Tags
No related merge requests found
...@@ -14,7 +14,7 @@ double qz_criterium = 1.000001; ...@@ -14,7 +14,7 @@ double qz_criterium = 1.000001;
lapack_int lapack_int
order_eigs(const double *alphar, const double *alphai, const double *beta) order_eigs(const double *alphar, const double *alphai, const double *beta)
{ {
return (*alphar **alphar + *alphai **alphai < *beta **beta * qz_criterium); return (*alphar **alphar + *alphai **alphai < *beta **beta * qz_criterium * qz_criterium);
} }
/* Here we solve the linear approximation. The result are the matrices /* Here we solve the linear approximation. The result are the matrices
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment