diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index 03715fc8f..42f7d8961 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -103,7 +103,7 @@ T float_next_imp(const T& val, const Policy& pol) int fpclass = (boost::math::fpclassify)(val); - if((fpclass == FP_NAN) || (fpclass == FP_INFINITE)) + if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE)) { if(val < 0) return -tools::max_value(); @@ -118,7 +118,7 @@ T float_next_imp(const T& val, const Policy& pol) if(val == 0) return detail::get_smallest_value(); - if((fpclass != FP_SUBNORMAL) && (fpclass != FP_ZERO) && (fabs(val) < detail::get_min_shift_value()) && (val != -tools::min_value())) + if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value()) && (val != -tools::min_value())) { // // Special case: if the value of the least significant bit is a denorm, and the result @@ -185,7 +185,7 @@ T float_prior_imp(const T& val, const Policy& pol) int fpclass = (boost::math::fpclassify)(val); - if((fpclass == FP_NAN) || (fpclass == FP_INFINITE)) + if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE)) { if(val > 0) return tools::max_value(); @@ -200,7 +200,7 @@ T float_prior_imp(const T& val, const Policy& pol) if(val == 0) return -detail::get_smallest_value(); - if((fpclass != FP_SUBNORMAL) && (fpclass != FP_ZERO) && (fabs(val) < detail::get_min_shift_value()) && (val != tools::min_value())) + if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value()) && (val != tools::min_value())) { // // Special case: if the value of the least significant bit is a denorm, and the result @@ -318,7 +318,7 @@ T float_distance_imp(const T& a, const T& b, const Policy& pol) // because we actually have fewer than tools::digits() // significant bits in the representation: // - frexp(((boost::math::fpclassify)(a) == FP_SUBNORMAL) ? tools::min_value() : a, &expon); + frexp(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) ? tools::min_value() : a, &expon); T upper = ldexp(T(1), expon); T result = 0; expon = tools::digits() - expon; @@ -335,7 +335,7 @@ T float_distance_imp(const T& a, const T& b, const Policy& pol) // errors in the subtraction: // T mb, x, y, z; - if(((boost::math::fpclassify)(a) == FP_SUBNORMAL) || (b - a < tools::min_value())) + if(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) || (b - a < tools::min_value())) { // // Special case - either one end of the range is a denormal, or else the difference is. @@ -399,7 +399,7 @@ T float_advance_imp(T val, int distance, const Policy& pol) int fpclass = (boost::math::fpclassify)(val); - if((fpclass == FP_NAN) || (fpclass == FP_INFINITE)) + if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE)) return policies::raise_domain_error( function, "Argument val must be finite, but got %1%", val, pol);