diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index 51723787b..f8a3c3e94 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -73,7 +73,7 @@ inline bool is_nan_helper(T t, const boost::true_type&) #ifdef isnan return isnan(t); #else // BOOST_HAS_FPCLASSIFY - return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == FP_NAN); + return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN); #endif } @@ -200,19 +200,19 @@ template inline bool isfinite BOOST_NO_MACRO_EXPAND(T z) { int t = (::boost::math::fpclassify)(z); - return (t != FP_NAN) && (t != FP_INFINITE); + return (t != (int)FP_NAN) && (t != (int)FP_INFINITE); } template inline bool isinf BOOST_NO_MACRO_EXPAND(T t) { - return (::boost::math::fpclassify)(t) == FP_INFINITE; + return (::boost::math::fpclassify)(t) == (int)FP_INFINITE; } template inline bool isnan BOOST_NO_MACRO_EXPAND(T t) { - return (::boost::math::fpclassify)(t) == FP_NAN; + return (::boost::math::fpclassify)(t) == (int)FP_NAN; } #ifdef isnan template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } @@ -232,7 +232,7 @@ template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ template inline bool isnormal BOOST_NO_MACRO_EXPAND(T t) { - return (::boost::math::fpclassify)(t) == FP_NORMAL; + return (::boost::math::fpclassify)(t) == (int)FP_NORMAL; } } // namespace math diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 0a0ed8f2b..1d02a3ddb 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -152,7 +152,7 @@ T gamma_imp(T z, const Policy& pol, const L& l) result = -boost::math::constants::pi() / result; if(result == 0) return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); - if((boost::math::fpclassify)(result) == FP_SUBNORMAL) + if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); return result; } @@ -352,7 +352,7 @@ T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l) result = -boost::math::constants::pi() / result; if(result == 0) return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); - if((boost::math::fpclassify)(result) == FP_SUBNORMAL) + if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); return result; } @@ -584,7 +584,7 @@ T full_igamma_prefix(T a, T z, const Policy& pol) // This error handling isn't very good: it happens after the fact // rather than before it... // - if((boost::math::fpclassify)(prefix) == FP_INFINITE) + if((boost::math::fpclassify)(prefix) == (int)FP_INFINITE) policies::raise_overflow_error("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol); return prefix;