diff DEPENDENCIES/generic/include/boost/math/distributions/geometric.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/math/distributions/geometric.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/math/distributions/geometric.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -372,8 +372,8 @@
       //RealType q = 1 - p;  // Bad for small p
       //RealType probability = 1 - std::pow(q, k+1);
 
-      RealType z = boost::math::log1p(-p) * (k+1);
-      RealType probability = -boost::math::expm1(z);
+      RealType z = boost::math::log1p(-p, Policy()) * (k + 1);
+      RealType probability = -boost::math::expm1(z, Policy());
 
       return probability;
     } // cdf Cumulative Distribution Function geometric.
@@ -398,7 +398,7 @@
       {
         return result;
       }
-      RealType z = boost::math::log1p(-p) * (k+1);
+      RealType z = boost::math::log1p(-p, Policy()) * (k+1);
       RealType probability = exp(z);
       return probability;
     } // cdf Complemented Cumulative Distribution Function geometric.
@@ -448,7 +448,7 @@
       }
    
       // log(1-x) /log(1-success_fraction) -1; but use log1p in case success_fraction is small
-      result = boost::math::log1p(-x) / boost::math::log1p(-success_fraction) -1;
+      result = boost::math::log1p(-x, Policy()) / boost::math::log1p(-success_fraction, Policy()) - 1;
       // Subtract a few epsilons here too?
       // to make sure it doesn't slip over, so ceil would be one too many.
       return result;
@@ -496,7 +496,7 @@
           // 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) -1;
+       result = log(x) / boost::math::log1p(-success_fraction, Policy()) - 1;
       return result;
 
     } // quantile complement