summaryrefslogtreecommitdiff
path: root/boost/math/special_functions/digamma.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/math/special_functions/digamma.hpp')
-rw-r--r--boost/math/special_functions/digamma.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/boost/math/special_functions/digamma.hpp b/boost/math/special_functions/digamma.hpp
index 718eaf9278..f6431c67a6 100644
--- a/boost/math/special_functions/digamma.hpp
+++ b/boost/math/special_functions/digamma.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/special_functions/math_fwd.hpp>
@@ -489,7 +491,7 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol)
// limit = 10 at 50 bit precision and
// limit = 250 at 1000 bit precision.
//
- T lim = 10 + (tools::digits<T>() - 50) * 240 / 950;
+ int lim = 10 + ((tools::digits<T>() - 50) * 240L) / 950;
T two_x = ldexp(x, 1);
if(x >= lim)
{
@@ -624,5 +626,10 @@ inline typename tools::promote_args<T>::type
} // namespace math
} // namespace boost
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif