Skip to content

Commit

Permalink
Update geometric.hpp
Browse files Browse the repository at this point in the history
Missing namespace in log

std::log should be used because compilation fails on macOS.

I made the same PR on Apr-2024

#1127
  • Loading branch information
kenarab authored Jan 30, 2025
1 parent a5c0625 commit 57d2ead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/math/distributions/geometric.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ namespace boost
}
if(k == 0)
{
return log(p); // success_fraction
return std::log(p); // success_fraction
}
//RealType q = 1 - p; // Bad for small p
//RealType probability = 1 - std::pow(q, k+1);
Expand Down Expand Up @@ -551,7 +551,7 @@ namespace boost
// unless #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
}
// log(x) /log(1-success_fraction) -1; but use log1p in case success_fraction is small
result = log(x) / boost::math::log1p(-success_fraction, Policy()) - 1;
result = std::log(x) / boost::math::log1p(-success_fraction, Policy()) - 1;
return result;

} // quantile complement
Expand Down

0 comments on commit 57d2ead

Please sign in to comment.