Pick up infinite bhp in addition to nan

This commit is contained in:
Vegard Kippe committed 2025-08-18 08:11:04 +02:00
1 parent 813de38be5
commit efa5752caf
1 file changed
+2 -2
+2 -2
View File
@@ -369,8 +369,8 @@ findTHP(const std::vector<Scalar>& bhp_array,
{
int nthp = thp_array.size();
if (std::isnan(bhp)) {
throw NumericalProblem("findTHP: Error bhp is nan");
if (!std::isfinite(bhp)) {
throw NumericalProblem("findTHP: Error bhp is not finite");
}
Scalar thp = -1e100;