2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-25 04:22:15 +00:00

Merge pull request #949 from mborland/15101

Fix for scipy issue 15101
This commit is contained in:
jzmaddock
2023-02-13 15:36:56 +00:00
committed by GitHub
3 changed files with 35 additions and 1 deletions

View File

@@ -373,7 +373,7 @@ T ibeta_power_terms(T a,
if(a < b)
{
T p1 = pow(b2, b / a);
T l3 = a * (log(b1) + log(p1));
T l3 = (b1 != 0) && (p1 != 0) ? (a * (log(b1) + log(p1))) : tools::max_value<T>(); // arbitrary large value if the logs would fail!
if((l3 < tools::log_max_value<T>())
&& (l3 > tools::log_min_value<T>()))
{