Index: boost/math/distributions/students_t.hpp =================================================================== --- boost/math/distributions/students_t.hpp (revision 84903) +++ boost/math/distributions/students_t.hpp (working copy) @@ -93,7 +93,7 @@ return error_result; RealType result; - if (boost::math::isinf(x)) + if ((boost::math::isinf)(x)) { // +infinity. normal_distribution n(0, 1); RealType result = pdf(n, x); @@ -144,7 +144,7 @@ { // Special case with exact result. return static_cast(0.5); } - if (boost::math::isinf(x)) + if ((boost::math::isinf)(x)) { // +infinity. normal_distribution n(0, 1); RealType result = cdf(n, x); @@ -376,7 +376,7 @@ df, Policy()); return std::numeric_limits::quiet_NaN(); // Undefined. } - if (boost::math::isinf(df)) + if ((boost::math::isinf)(df)) { // +infinity. return 1; } @@ -422,7 +422,7 @@ df, Policy()); return std::numeric_limits::quiet_NaN(); // Undefined. } - if (boost::math::isinf(df)) + if ((boost::math::isinf)(df)) { // +infinity. return 3; } @@ -456,7 +456,7 @@ df, Policy()); return std::numeric_limits::quiet_NaN(); // Undefined. } - if (boost::math::isinf(df)) + if ((boost::math::isinf)(df)) { // +infinity. return 0; } Index: boost/math/distributions/non_central_t.hpp =================================================================== --- boost/math/distributions/non_central_t.hpp (revision 84903) +++ boost/math/distributions/non_central_t.hpp (working copy) @@ -206,7 +206,7 @@ T non_central_t_cdf(T v, T delta, T t, bool invert, const Policy& pol) { BOOST_MATH_STD_USING - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { // Infinite degrees of freedom, so use normal distribution located at delta. normal_distribution n(delta, 1); return cdf(n, t); @@ -320,7 +320,7 @@ value_type guess = 0; - if ( (boost::math::isinf(v)) || (v > 1 / boost::math::tools::epsilon()) ) + if ( ((boost::math::isinf)(v)) || (v > 1 / boost::math::tools::epsilon()) ) { // Infinite or very large degrees of freedom, so use normal distribution located at delta. normal_distribution n(delta, 1); if (p < q) @@ -447,7 +447,7 @@ T non_central_t_pdf(T n, T delta, T t, const Policy& pol) { BOOST_MATH_STD_USING - if (boost::math::isinf(n)) + if ((boost::math::isinf)(n)) { // Infinite degrees of freedom, so use normal distribution located at delta. normal_distribution n(delta, 1); return pdf(n, t); @@ -515,7 +515,7 @@ template T mean(T v, T delta, const Policy& pol) { - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { return delta; } @@ -536,7 +536,7 @@ template T variance(T v, T delta, const Policy& pol) { - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { return 1; } @@ -554,7 +554,7 @@ T skewness(T v, T delta, const Policy& pol) { BOOST_MATH_STD_USING - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { return 0; } @@ -576,7 +576,7 @@ T kurtosis_excess(T v, T delta, const Policy& pol) { BOOST_MATH_STD_USING - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { return 3; } @@ -1097,7 +1097,7 @@ &r, Policy())) return (RealType)r; - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { // Infinite degrees of freedom, so use normal distribution located at delta. normal_distribution n(l, 1); cdf(n, x); @@ -1152,7 +1152,7 @@ Policy())) return (RealType)r; - if (boost::math::isinf(v)) + if ((boost::math::isinf)(v)) { // Infinite degrees of freedom, so use normal distribution located at delta. normal_distribution n(l, 1); return cdf(complement(n, x)); Index: boost/multiprecision/detail/default_ops.hpp =================================================================== --- boost/multiprecision/detail/default_ops.hpp (revision 84903) +++ boost/multiprecision/detail/default_ops.hpp (working copy) @@ -1117,52 +1117,52 @@ inline int fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression& arg) { typedef typename multiprecision::detail::expression::result_type value_type; - return fpclassify(value_type(arg)); + return (fpclassify)(value_type(arg)); } template inline bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number& arg) { - int v = fpclassify(arg); + int v = (fpclassify)(arg); return (v != FP_INFINITE) && (v != FP_NAN); } template inline bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression& arg) { typedef typename multiprecision::detail::expression::result_type value_type; - return isfinite(value_type(arg)); + return (isfinite)(value_type(arg)); } template inline bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number& arg) { - return fpclassify(arg) == FP_NAN; + return (fpclassify)(arg) == FP_NAN; } template inline bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression& arg) { typedef typename multiprecision::detail::expression::result_type value_type; - return isnan(value_type(arg)); + return (isnan)(value_type(arg)); } template inline bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number& arg) { - return fpclassify(arg) == FP_INFINITE; + return (fpclassify)(arg) == FP_INFINITE; } template inline bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression& arg) { typedef typename multiprecision::detail::expression::result_type value_type; - return isinf(value_type(arg)); + return (isinf)(value_type(arg)); } template inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number& arg) { - return fpclassify(arg) == FP_NORMAL; + return (fpclassify)(arg) == FP_NORMAL; } template inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression& arg) { typedef typename multiprecision::detail::expression::result_type value_type; - return isnormal(value_type(arg)); + return (isnormal)(value_type(arg)); } } // namespace math @@ -1249,7 +1249,7 @@ { typedef typename detail::expression::result_type number_type; number_type r = trunc(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, number_type(v), 0, pol); return r.template convert_to(); } @@ -1262,7 +1262,7 @@ inline int itrunc(const number& v, const Policy& pol) { number r = trunc(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, v, 0, pol); return r.template convert_to(); } @@ -1276,7 +1276,7 @@ { typedef typename detail::expression::result_type number_type; number_type r = trunc(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, number_type(v), 0L, pol); return r.template convert_to(); } @@ -1289,7 +1289,7 @@ inline long ltrunc(const number& v, const Policy& pol) { number r = trunc(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, v, 0L, pol); return r.template convert_to(); } @@ -1304,7 +1304,7 @@ { typedef typename detail::expression::result_type number_type; number_type r = trunc(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, number_type(v), 0LL, pol); return r.template convert_to(); } @@ -1317,7 +1317,7 @@ inline long long lltrunc(const number& v, const Policy& pol) { number r = trunc(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, v, 0LL, pol); return r.template convert_to(); } @@ -1347,7 +1347,7 @@ { typedef typename detail::expression::result_type number_type; number_type r = round(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0, pol); return r.template convert_to(); } @@ -1360,7 +1360,7 @@ inline int iround(const number& v, const Policy& pol) { number r = round(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0, pol); return r.template convert_to(); } @@ -1374,7 +1374,7 @@ { typedef typename detail::expression::result_type number_type; number_type r = round(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, number_type(v), 0L, pol); return r.template convert_to(); } @@ -1387,7 +1387,7 @@ inline long lround(const number& v, const Policy& pol) { number r = round(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, v, 0L, pol); return r.template convert_to(); } @@ -1402,7 +1402,7 @@ { typedef typename detail::expression::result_type number_type; number_type r = round(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0LL, pol); return r.template convert_to(); } @@ -1415,7 +1415,7 @@ inline long long llround(const number& v, const Policy& pol) { number r = round(v, pol); - if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !boost::math::isfinite(v)) + if((r > (std::numeric_limits::max)()) || r < (std::numeric_limits::min)() || !(boost::math::isfinite)(v)) return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0LL, pol); return r.template convert_to(); } Index: boost/multiprecision/cpp_dec_float.hpp =================================================================== --- boost/multiprecision/cpp_dec_float.hpp (revision 84903) +++ boost/multiprecision/cpp_dec_float.hpp (working copy) @@ -440,9 +440,9 @@ } // Comparison functions - bool isnan (void) const { return (fpclass == cpp_dec_float_NaN); } - bool isinf (void) const { return (fpclass == cpp_dec_float_inf); } - bool isfinite(void) const { return (fpclass == cpp_dec_float_finite); } + bool isnan BOOST_NO_MACRO_EXPAND(void) const { return (fpclass == cpp_dec_float_NaN); } + bool isinf BOOST_NO_MACRO_EXPAND(void) const { return (fpclass == cpp_dec_float_inf); } + bool isfinite BOOST_NO_MACRO_EXPAND(void) const { return (fpclass == cpp_dec_float_finite); } bool iszero (void) const { @@ -505,7 +505,7 @@ static cpp_dec_float pow2(long long i); ExponentType order()const { - const bool bo_order_is_zero = ((!isfinite()) || (data[0] == static_cast(0u))); + const bool bo_order_is_zero = ((!(isfinite)()) || (data[0] == static_cast(0u))); // // Binary search to find the order of the leading term: // @@ -609,14 +609,14 @@ template cpp_dec_float& cpp_dec_float::operator+=(const cpp_dec_float& v) { - if(isnan()) + if((isnan)()) { return *this; } - if(isinf()) + if((isinf)()) { - if(v.isinf() && (isneg() != v.isneg())) + if((v.isinf)() && (isneg() != v.isneg())) { *this = nan(); } @@ -846,12 +846,12 @@ neg = false; // Handle special cases like zero, inf and NaN. - const bool b_u_is_inf = isinf(); - const bool b_v_is_inf = v.isinf(); + const bool b_u_is_inf = (isinf)(); + const bool b_v_is_inf = (v.isinf)(); const bool b_u_is_zero = iszero(); const bool b_v_is_zero = v.iszero(); - if( (isnan() || v.isnan()) + if( ((isnan)() || (v.isnan)()) || (b_u_is_inf && b_v_is_zero) || (b_v_is_inf && b_u_is_zero) ) @@ -932,7 +932,7 @@ template cpp_dec_float& cpp_dec_float::operator/=(const cpp_dec_float& v) { - const bool u_and_v_are_finite_and_identical = ( isfinite() + const bool u_and_v_are_finite_and_identical = ( (isfinite)() && (fpclass == v.fpclass) && (exp == v.exp) && (cmp_data(v.data) == static_cast(0))); @@ -952,7 +952,7 @@ { if(iszero()) { - if(v.isnan() || v.iszero()) + if((v.isnan)() || v.iszero()) { return *this = v; } @@ -976,10 +976,10 @@ neg = false; // Handle special cases like zero, inf and NaN. - const bool b_u_is_inf = isinf(); + const bool b_u_is_inf = (isinf)(); const bool b_n_is_zero = (n == static_cast(0)); - if(isnan() || (b_u_is_inf && b_n_is_zero)) + if((isnan)() || (b_u_is_inf && b_n_is_zero)) { return (*this = nan()); } @@ -1071,12 +1071,12 @@ neg = false; // Handle special cases like zero, inf and NaN. - if(isnan()) + if((isnan)()) { return *this; } - if(isinf()) + if((isinf)()) { *this = inf(); if(b_neg) @@ -1165,12 +1165,12 @@ return *this; } - if(isnan()) + if((isnan)()) { return *this; } - if(isinf()) + if((isinf)()) { return *this = zero(); } @@ -1227,7 +1227,7 @@ { // Compute the square root of *this. - if(isneg() || (!isfinite())) + if(isneg() || (!(isfinite)())) { *this = nan(); return *this; @@ -1336,21 +1336,21 @@ // -1 for *this < v // Handle all non-finite cases. - if((!isfinite()) || (!v.isfinite())) + if((!(isfinite)()) || (!(v.isfinite)())) { // NaN can never equal NaN. Return an implementation-dependent // signed result. Also note that comparison of NaN with NaN // using operators greater-than or less-than is undefined. - if(isnan() || v.isnan()) { return (isnan() ? 1 : -1); } + if((isnan)() || (v.isnan)()) { return ((isnan)() ? 1 : -1); } - if(isinf() && v.isinf()) + if((isinf)() && (v.isinf)()) { // Both *this and v are infinite. They are equal if they have the same sign. // Otherwise, *this is less than v if and only if *this is negative. return ((neg == v.neg) ? 0 : (neg ? -1 : 1)); } - if(isinf()) + if((isinf)()) { // *this is infinite, but v is finite. // So negative infinite *this is less than any finite v. @@ -1410,7 +1410,7 @@ { // Check if the value of *this is identically 1 or very close to 1. - const bool not_negative_and_is_finite = ((!neg) && isfinite()); + const bool not_negative_and_is_finite = ((!neg) && (isfinite)()); if(not_negative_and_is_finite) { @@ -1506,9 +1506,9 @@ // Returns the double conversion of a cpp_dec_float. // Check for non-normal cpp_dec_float. - if(!isfinite()) + if(!(isfinite)()) { - if(isnan()) + if((isnan)()) { return std::numeric_limits::quiet_NaN(); } @@ -1552,9 +1552,9 @@ // Returns the long double conversion of a cpp_dec_float. // Check if *this cpp_dec_float is subnormal. - if(!isfinite()) + if(!(isfinite)()) { - if(isnan()) + if((isnan)()) { return std::numeric_limits::quiet_NaN(); } @@ -1686,7 +1686,7 @@ { // Compute the signed integer part of x. - if(!isfinite()) + if(!(isfinite)()) { return *this; } @@ -1716,7 +1716,7 @@ template std::string cpp_dec_float::str(boost::intmax_t number_of_digits, std::ios_base::fmtflags f) const { - if(this->isinf()) + if((this->isinf)()) { if(this->isneg()) return "-inf"; @@ -1725,7 +1725,7 @@ else return "inf"; } - else if(this->isnan()) + else if((this->isnan)()) { return "nan"; } @@ -2722,9 +2722,9 @@ template inline int eval_fpclassify(const cpp_dec_float& x) { - if(x.isinf()) + if((x.isinf)()) return FP_INFINITE; - if(x.isnan()) + if((x.isnan)()) return FP_NAN; if(x.iszero()) return FP_ZERO; @@ -2758,7 +2758,7 @@ inline void eval_floor(cpp_dec_float& result, const cpp_dec_float& x) { result = x; - if(!x.isfinite() || x.isint()) + if(!(x.isfinite)() || x.isint()) { return; } @@ -2772,7 +2772,7 @@ inline void eval_ceil(cpp_dec_float& result, const cpp_dec_float& x) { result = x; - if(!x.isfinite() || x.isint()) + if(!(x.isfinite)() || x.isint()) { return; } @@ -2785,7 +2785,7 @@ template inline void eval_trunc(cpp_dec_float& result, const cpp_dec_float& x) { - if(!x.isfinite()) + if(!(x.isfinite)()) { result = boost::math::policies::raise_rounding_error("boost::multiprecision::trunc<%1%>(%1%)", 0, number >(x), number >(x), boost::math::policies::policy<>()).backend(); return; @@ -2844,7 +2844,7 @@ result *= cpp_dec_float::pow2(-t); - if(result.iszero() || result.isinf() || result.isnan()) + if(result.iszero() || (result.isinf)() || (result.isnan)()) { // pow2 overflowed, slip the calculation up: result = x; Index: libs/math/test/test_students_t.cpp =================================================================== --- libs/math/test/test_students_t.cpp (revision 84903) +++ libs/math/test/test_students_t.cpp (working copy) @@ -634,54 +634,54 @@ if(std::numeric_limits::has_quiet_NaN) { // Mean - BOOST_CHECK(boost::math::isnan(mean(ignore_error_students_t(-1)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_students_t(0)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_students_t(1)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_students_t(-1)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_students_t(0)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_students_t(1)))); // Variance - BOOST_CHECK(boost::math::isnan(variance(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_students_t(-1)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_students_t(0)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_students_t(1)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_students_t(static_cast(1.7L))))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_students_t(2)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_students_t(-1)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_students_t(0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_students_t(1)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_students_t(static_cast(1.7L))))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_students_t(2)))); // Skewness - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_students_t(-1)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_students_t(0)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_students_t(1)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_students_t(2)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_students_t(3)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_students_t(-1)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_students_t(0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_students_t(1)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_students_t(2)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_students_t(3)))); // Kurtosis - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(-1)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(1)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(2)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(static_cast(2.0001L))))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(3)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_students_t(4)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(-1)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(1)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(2)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(static_cast(2.0001L))))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(3)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_students_t(4)))); // Kurtosis excess - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(-1)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(1)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(2)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(static_cast(2.0001L))))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(3)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_students_t(4)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(std::numeric_limits::quiet_NaN())))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(-1)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(1)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(2)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(static_cast(2.0001L))))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(3)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_students_t(4)))); } // has_quiet_NaN - BOOST_CHECK(boost::math::isfinite(mean(ignore_error_students_t(1 + std::numeric_limits::epsilon())))); - BOOST_CHECK(boost::math::isfinite(variance(ignore_error_students_t(2 + 2 * std::numeric_limits::epsilon())))); - BOOST_CHECK(boost::math::isfinite(variance(ignore_error_students_t(static_cast(2.0001L))))); - BOOST_CHECK(boost::math::isfinite(variance(ignore_error_students_t(2 + 2 * std::numeric_limits::epsilon())))); - BOOST_CHECK(boost::math::isfinite(skewness(ignore_error_students_t(3 + 3 * std::numeric_limits::epsilon())))); - BOOST_CHECK(boost::math::isfinite(kurtosis(ignore_error_students_t(4 + 4 * std::numeric_limits::epsilon())))); - BOOST_CHECK(boost::math::isfinite(kurtosis(ignore_error_students_t(static_cast(4.0001L))))); + BOOST_CHECK((boost::math::isfinite)(mean(ignore_error_students_t(1 + std::numeric_limits::epsilon())))); + BOOST_CHECK((boost::math::isfinite)(variance(ignore_error_students_t(2 + 2 * std::numeric_limits::epsilon())))); + BOOST_CHECK((boost::math::isfinite)(variance(ignore_error_students_t(static_cast(2.0001L))))); + BOOST_CHECK((boost::math::isfinite)(variance(ignore_error_students_t(2 + 2 * std::numeric_limits::epsilon())))); + BOOST_CHECK((boost::math::isfinite)(skewness(ignore_error_students_t(3 + 3 * std::numeric_limits::epsilon())))); + BOOST_CHECK((boost::math::isfinite)(kurtosis(ignore_error_students_t(4 + 4 * std::numeric_limits::epsilon())))); + BOOST_CHECK((boost::math::isfinite)(kurtosis(ignore_error_students_t(static_cast(4.0001L))))); // check_out_of_range >(1); // Cannot be used because fails "exception std::domain_error is expected" Index: libs/math/test/test_airy.cpp =================================================================== --- libs/math/test/test_airy.cpp (revision 84903) +++ libs/math/test/test_airy.cpp (working copy) @@ -49,10 +49,10 @@ for(unsigned i = 0; i < data.size(); ++i) { BOOST_CHECK_CLOSE_FRACTION(data[i][1], boost::math::airy_ai(data[i][0]), tol); - if(boost::math::isfinite(data[i][2])) + if((boost::math::isfinite)(data[i][2])) BOOST_CHECK_CLOSE_FRACTION(data[i][2], boost::math::airy_bi(data[i][0]), tol); BOOST_CHECK_CLOSE_FRACTION(data[i][3], boost::math::airy_ai_prime(data[i][0]), tol); - if(boost::math::isfinite(data[i][4])) + if((boost::math::isfinite)(data[i][4])) BOOST_CHECK_CLOSE_FRACTION(data[i][4], boost::math::airy_bi_prime(data[i][0]), tol); } } Index: libs/math/test/test_nc_t.cpp =================================================================== --- libs/math/test/test_nc_t.cpp (revision 84903) +++ libs/math/test/test_nc_t.cpp (working copy) @@ -737,61 +737,61 @@ if(std::numeric_limits::has_quiet_NaN) { // Mean - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(-nan, 0)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(+nan, 0)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(-1, 0)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(0, 0)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(1, 0)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(2, nan)))); - BOOST_CHECK(boost::math::isnan(mean(ignore_error_non_central_t(nan, nan)))); - BOOST_CHECK(boost::math::isfinite(mean(ignore_error_non_central_t(2, 0)))); // OK + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(-nan, 0)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(+nan, 0)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(-1, 0)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(0, 0)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(1, 0)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(2, nan)))); + BOOST_CHECK((boost::math::isnan)(mean(ignore_error_non_central_t(nan, nan)))); + BOOST_CHECK((boost::math::isfinite)(mean(ignore_error_non_central_t(2, 0)))); // OK // Variance - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(nan, 0)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(1, nan)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(2, nan)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(-1, 0)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(0, 0)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(1, 0)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(static_cast(1.7L), 0)))); - BOOST_CHECK(boost::math::isnan(variance(ignore_error_non_central_t(2, 0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(nan, 0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(1, nan)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(2, nan)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(-1, 0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(0, 0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(1, 0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(static_cast(1.7L), 0)))); + BOOST_CHECK((boost::math::isnan)(variance(ignore_error_non_central_t(2, 0)))); // Skewness - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_non_central_t(std::numeric_limits::quiet_NaN(), 0)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_non_central_t(-1, 0)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_non_central_t(0, 0)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_non_central_t(1, 0)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_non_central_t(2, 0)))); - BOOST_CHECK(boost::math::isnan(skewness(ignore_error_non_central_t(3, 0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_non_central_t(std::numeric_limits::quiet_NaN(), 0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_non_central_t(-1, 0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_non_central_t(0, 0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_non_central_t(1, 0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_non_central_t(2, 0)))); + BOOST_CHECK((boost::math::isnan)(skewness(ignore_error_non_central_t(3, 0)))); // Kurtosis - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(std::numeric_limits::quiet_NaN(), 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(-1, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(0, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(1, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(2, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(static_cast(2.0001L), 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(3, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis(ignore_error_non_central_t(4, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(std::numeric_limits::quiet_NaN(), 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(-1, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(0, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(1, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(2, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(static_cast(2.0001L), 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(3, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis(ignore_error_non_central_t(4, 0)))); // Kurtosis excess - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(std::numeric_limits::quiet_NaN(), 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(-1, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(0, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(1, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(2, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(static_cast(2.0001L), 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(3, 0)))); - BOOST_CHECK(boost::math::isnan(kurtosis_excess(ignore_error_non_central_t(4, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(std::numeric_limits::quiet_NaN(), 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(-1, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(0, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(1, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(2, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(static_cast(2.0001L), 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(3, 0)))); + BOOST_CHECK((boost::math::isnan)(kurtosis_excess(ignore_error_non_central_t(4, 0)))); } // has_quiet_NaN - BOOST_CHECK(boost::math::isfinite(mean(ignore_error_non_central_t(1 + std::numeric_limits::epsilon(), 0)))); - BOOST_CHECK(boost::math::isfinite(variance(ignore_error_non_central_t(2 + 2 * std::numeric_limits::epsilon(), 0)))); - BOOST_CHECK(boost::math::isfinite(variance(ignore_error_non_central_t(static_cast(2.0001L), 0)))); - BOOST_CHECK(boost::math::isfinite(variance(ignore_error_non_central_t(2 + 2 * std::numeric_limits::epsilon(), 0)))); - BOOST_CHECK(boost::math::isfinite(skewness(ignore_error_non_central_t(3 + 3 * std::numeric_limits::epsilon(), 0)))); - BOOST_CHECK(boost::math::isfinite(kurtosis(ignore_error_non_central_t(4 + 4 * std::numeric_limits::epsilon(), 0)))); - BOOST_CHECK(boost::math::isfinite(kurtosis(ignore_error_non_central_t(static_cast(4.0001L), 0)))); + BOOST_CHECK((boost::math::isfinite)(mean(ignore_error_non_central_t(1 + std::numeric_limits::epsilon(), 0)))); + BOOST_CHECK((boost::math::isfinite)(variance(ignore_error_non_central_t(2 + 2 * std::numeric_limits::epsilon(), 0)))); + BOOST_CHECK((boost::math::isfinite)(variance(ignore_error_non_central_t(static_cast(2.0001L), 0)))); + BOOST_CHECK((boost::math::isfinite)(variance(ignore_error_non_central_t(2 + 2 * std::numeric_limits::epsilon(), 0)))); + BOOST_CHECK((boost::math::isfinite)(skewness(ignore_error_non_central_t(3 + 3 * std::numeric_limits::epsilon(), 0)))); + BOOST_CHECK((boost::math::isfinite)(kurtosis(ignore_error_non_central_t(4 + 4 * std::numeric_limits::epsilon(), 0)))); + BOOST_CHECK((boost::math::isfinite)(kurtosis(ignore_error_non_central_t(static_cast(4.0001L), 0)))); // check_out_of_range >(1, 0); // Fails one check because allows df = infinity. check_support >(non_central_t_distribution(1, 0)); Index: libs/math/test/complex_test.cpp =================================================================== --- libs/math/test/complex_test.cpp (revision 84903) +++ libs/math/test/complex_test.cpp (working copy) @@ -406,7 +406,7 @@ BOOST_CHECK((boost::math::isnan)(result.real())); BOOST_CHECK(result.imag() == infinity); } - if(boost::math::signbit(mzero)) + if((boost::math::signbit)(mzero)) { result = boost::math::acos(ct(-1.25f, zero)); BOOST_CHECK(result.real() > 0); @@ -537,7 +537,7 @@ BOOST_CHECK((boost::math::isnan)(result.real())); BOOST_CHECK((boost::math::isnan)(result.imag())); } - if(boost::math::signbit(mzero)) + if((boost::math::signbit)(mzero)) { result = boost::math::acosh(ct(-2.5f, zero)); BOOST_CHECK(result.real() > 0); @@ -669,7 +669,7 @@ BOOST_CHECK(std::fabs(result.real()) == infinity); BOOST_CHECK((boost::math::isnan)(result.imag())); } - if(boost::math::signbit(mzero)) + if((boost::math::signbit)(mzero)) { result = boost::math::asinh(ct(zero, 1.5f)); BOOST_CHECK(result.real() > 0); @@ -817,7 +817,7 @@ BOOST_CHECK((boost::math::isnan)(result.imag())); } - if(boost::math::signbit(mzero)) + if((boost::math::signbit)(mzero)) { result = boost::math::atanh(ct(-2.0f, mzero)); BOOST_CHECK(result.real() < 0); Index: libs/multiprecision/test/test_arithmetic.hpp =================================================================== --- libs/multiprecision/test/test_arithmetic.hpp (revision 84903) +++ libs/multiprecision/test/test_arithmetic.hpp (working copy) @@ -813,7 +813,7 @@ { if(std::numeric_limits::has_infinity) { - BOOST_CHECK(boost::math::isinf(Real(20) / 0u)); + BOOST_CHECK((boost::math::isinf)(Real(20) / 0u)); } else { Index: libs/multiprecision/test/test_numeric_limits.cpp =================================================================== --- libs/multiprecision/test/test_numeric_limits.cpp (revision 84903) +++ libs/multiprecision/test/test_numeric_limits.cpp (working copy) @@ -72,12 +72,12 @@ Number minv, maxv; minv = (std::numeric_limits::min)(); maxv = (std::numeric_limits::max)(); - BOOST_CHECK(boost::math::isnormal(minv)); - BOOST_CHECK(boost::math::isnormal(maxv)); - BOOST_CHECK(boost::math::isnormal(log(minv))); - BOOST_CHECK(boost::math::isnormal(log(maxv))); - BOOST_CHECK(boost::math::isnormal(sqrt(minv))); - BOOST_CHECK(boost::math::isnormal(sqrt(maxv))); + BOOST_CHECK((boost::math::isnormal)(minv)); + BOOST_CHECK((boost::math::isnormal)(maxv)); + BOOST_CHECK((boost::math::isnormal)(log(minv))); + BOOST_CHECK((boost::math::isnormal)(log(maxv))); + BOOST_CHECK((boost::math::isnormal)(sqrt(minv))); + BOOST_CHECK((boost::math::isnormal)(sqrt(maxv))); if(std::numeric_limits::is_specialized) { Index: libs/multiprecision/test/test_float_io.cpp =================================================================== --- libs/multiprecision/test/test_float_io.cpp (revision 84903) +++ libs/multiprecision/test/test_float_io.cpp (working copy) @@ -201,7 +201,7 @@ T val = std::numeric_limits::quiet_NaN(); BOOST_CHECK_EQUAL(val.str(), "nan"); val = static_cast("nan"); - BOOST_CHECK(boost::math::isnan(val)); + BOOST_CHECK((boost::math::isnan)(val)); } }