Skip to content

Commit

Permalink
Check update of xterm for denom of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Nov 16, 2023
1 parent de64f02 commit d18964d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/boost/math/distributions/non_central_beta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ namespace boost
}
pois *= i / l2;
beta -= xterm;
xterm *= (a + i - 1) / (x * (a + b + i - 2));
if (a + b + i - 2 != 0)
{
xterm *= (a + i - 1) / (x * (a + b + i - 2));
}
}
return sum;
}
Expand Down

0 comments on commit d18964d

Please sign in to comment.