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
time-shift
Sébastien Villemot 2019-01-15 13:58:00 +01:00
parent 2a82177304
commit 8ebcd7cae6
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ double qz_criterium = 1.000001;
lapack_int
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