update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -14,6 +14,11 @@
// using boost::math::isfinite;
// using boost::math::isnan;
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
#endif
namespace boost{ namespace math{ namespace detail
{
@@ -112,6 +117,26 @@ inline bool check_x(
return true;
} // bool check_x
template <class RealType, class Policy>
inline bool check_x_not_NaN(
const char* function,
RealType x,
RealType* result,
const Policy& pol)
{
// Note that this test catches only NaN.
// Some distributions permit x to be infinite, leaving this test to catch any NaNs.
// See Normal, Logistic, Laplace and Cauchy for example.
if ((boost::math::isnan)(x))
{
*result = policies::raise_domain_error<RealType>(
function,
"Random variate x is %1%, but must be finite or + or - infinity!", x, pol);
return false;
}
return true;
} // bool check_x_not_NaN
template <class RealType, class Policy>
inline bool check_x_gt0(
const char* function,
@@ -191,4 +216,8 @@ inline bool check_finite(
} // namespace math
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#endif // BOOST_MATH_DISTRIBUTIONS_COMMON_ERROR_HANDLING_HPP