diff --git a/regression/SkatO.cpp b/regression/SkatO.cpp index d6c64d6..95e0463 100644 --- a/regression/SkatO.cpp +++ b/regression/SkatO.cpp @@ -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;