diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index f4019bd3d..574dd3021 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -963,14 +963,14 @@ T binomial_ccdf(T n, T k, T x, T y, const Policy& pol) int start = itrunc(n * x); if(start <= k + 1) start = itrunc(k + 2); - result = pow(x, start) * pow(y, n - start) * boost::math::binomial_coefficient(itrunc(n), itrunc(start), pol); + result = static_cast(pow(x, start) * pow(y, n - start) * boost::math::binomial_coefficient(itrunc(n), itrunc(start), pol)); if(result == 0) { // OK, starting slightly above the mode didn't work, // we'll have to sum the terms the old fashioned way: for(unsigned i = start - 1; i > k; --i) { - result += pow(x, (int)i) * pow(y, n - i) * boost::math::binomial_coefficient(itrunc(n), itrunc(i), pol); + result += static_cast(pow(x, static_cast(i)) * pow(y, n - i) * boost::math::binomial_coefficient(itrunc(n), itrunc(i), pol)); } } else diff --git a/include/boost/math/special_functions/chebyshev.hpp b/include/boost/math/special_functions/chebyshev.hpp index 8d64febc6..d69fd9c50 100644 --- a/include/boost/math/special_functions/chebyshev.hpp +++ b/include/boost/math/special_functions/chebyshev.hpp @@ -200,7 +200,7 @@ inline Real unchecked_chebyshev_clenshaw_recurrence(const Real* const c, size_t // See "An Error Analysis of the Modified Clenshaw Method for Evaluating Chebyshev and Fourier Series" // J. OLIVER, IMA Journal of Applied Mathematics, Volume 20, Issue 3, November 1977, Pages 379-391 // https://doi.org/10.1093/imamat/20.3.379 - const Real cutoff = 0.6; + const auto cutoff = static_cast(0.6L); if (x - a < b - x) { u = 2*(x-a)/(b-a); diff --git a/include/boost/math/special_functions/detail/bessel_jy_series.hpp b/include/boost/math/special_functions/detail/bessel_jy_series.hpp index 35d3ae103..6d9ff15fa 100644 --- a/include/boost/math/special_functions/detail/bessel_jy_series.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy_series.hpp @@ -12,6 +12,8 @@ #include #include +#include +#include namespace boost { namespace math { namespace detail{ @@ -234,7 +236,7 @@ T bessel_yn_small_z(int n, T z, T* scale, const Policy& pol) } else { - T p = pow(z / 2, n); + auto p = static_cast(pow(z / 2, n)); T result = -((boost::math::factorial(n - 1, pol) / constants::pi())); if(p * tools::max_value() < result) { diff --git a/include/boost/math/special_functions/detail/hypergeometric_series.hpp b/include/boost/math/special_functions/detail/hypergeometric_series.hpp index c4915bdcf..2a2a54af9 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_series.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_series.hpp @@ -239,7 +239,7 @@ return r; } int s1, s2; - T r = boost::math::lgamma(T(z + n), &s1, pol) - boost::math::lgamma(z, &s2, pol); + auto r = static_cast(boost::math::lgamma(T(z + n), &s1, pol) - boost::math::lgamma(z, &s2, pol)); if(s) *s = s1 * s2; return r;