diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index b3d2651bc..b8a5d2ad0 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -127,7 +127,7 @@ T float_next(const T& val, const Policy& pol) // would not be a denorm, then shift the input, increment, and shift back. // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set. // - return ldexp(float_next(ldexp(val, 2 * tools::digits()), pol), -2 * tools::digits()); + return ldexp(float_next(T(ldexp(val, 2 * tools::digits())), pol), -2 * tools::digits()); } if(-0.5f == frexp(val, &expon)) @@ -198,7 +198,7 @@ T float_prior(const T& val, const Policy& pol) // would not be a denorm, then shift the input, increment, and shift back. // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set. // - return ldexp(float_prior(ldexp(val, 2 * tools::digits()), pol), -2 * tools::digits()); + return ldexp(float_prior(T(ldexp(val, 2 * tools::digits())), pol), -2 * tools::digits()); } T remain = frexp(val, &expon); @@ -323,7 +323,7 @@ T float_distance(const T& a, const T& b, const Policy& pol) // T a2 = ldexp(a, tools::digits()); T b2 = ldexp(b, tools::digits()); - mb = -(std::min)(ldexp(upper, tools::digits()), b2); + mb = -(std::min)(T(ldexp(upper, tools::digits())), b2); x = a2 + mb; z = x - a2; y = (a2 - (x - z)) + (mb - z); diff --git a/include/boost/math/tools/big_constant.hpp b/include/boost/math/tools/big_constant.hpp index be397a93e..495f89c13 100644 --- a/include/boost/math/tools/big_constant.hpp +++ b/include/boost/math/tools/big_constant.hpp @@ -53,7 +53,7 @@ inline BOOST_CONSTEXPR const char* make_big_value(long double, const char* s, mp // For constants too huge for any conceivable long double (and which generate compiler errors if we try and declare them as such): // #define BOOST_MATH_HUGE_CONSTANT(T, D, x)\ - boost::math::tools::make_big_value(0.0L, BOOST_STRINGIZE(x), is_floating_point(), boost::is_convertible()) + boost::math::tools::make_big_value(0.0L, BOOST_STRINGIZE(x), mpl::bool_::value || (std::numeric_limits::is_specialized && std::numeric_limits::max_exponent <= std::numeric_limits::max_exponent)>(), boost::is_convertible()) }}} // namespaces