Skip to content

Commit 419f44a

Browse files
authored
Update geometric.hpp
Implemented suggested change in #1127 (review)
1 parent 52af702 commit 419f44a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/boost/math/distributions/geometric.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ namespace boost
384384
inline RealType logcdf(const geometric_distribution<RealType, Policy>& dist, const RealType& k)
385385
{ // Cumulative Distribution Function of geometric.
386386
using std::pow;
387+
using std::log;
387388
static const char* function = "boost::math::logcdf(const geometric_distribution<%1%>&, %1%)";
388389

389390
// k argument may be integral, signed, or unsigned, or floating point.
@@ -401,7 +402,7 @@ namespace boost
401402
}
402403
if(k == 0)
403404
{
404-
return std::log(p); // success_fraction
405+
return log(p); // success_fraction
405406
}
406407
//RealType q = 1 - p; // Bad for small p
407408
//RealType probability = 1 - std::pow(q, k+1);

0 commit comments

Comments
 (0)