Skip to content

Commit

Permalink
Update SkatO.cpp
Browse files Browse the repository at this point in the history
possible fixe for zhanxw#133
  • Loading branch information
lindenb authored Jan 26, 2022
1 parent 8defd6f commit 22f1fa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion regression/SkatO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ class SkatO::SkatOImpl {
}
}
double temp;
if (kappa > lambda.sum() * 10000) {
/** VarQ <= 0.0 : fixes: https://github.com/zhanxw/rvtests/issues/133 */
if (kappa > lambda.sum() * 10000 || VarQ <= 0.0) {
temp = 0.0;
} else {
double Q = (kappa - MuQ) * sqrt(VarQ - VarZeta) / sqrt(VarQ) + MuQ;
Expand Down

0 comments on commit 22f1fa0

Please sign in to comment.