diff options
Diffstat (limited to 'boost/multiprecision/detail/functions')
-rw-r--r-- | boost/multiprecision/detail/functions/pow.hpp | 10 | ||||
-rw-r--r-- | boost/multiprecision/detail/functions/trig.hpp | 20 |
2 files changed, 23 insertions, 7 deletions
diff --git a/boost/multiprecision/detail/functions/pow.hpp b/boost/multiprecision/detail/functions/pow.hpp index 5b54a1a9a8..b58d6b07be 100644 --- a/boost/multiprecision/detail/functions/pow.hpp +++ b/boost/multiprecision/detail/functions/pow.hpp @@ -12,6 +12,11 @@ // This file has no include guards or namespaces - it's expanded inline inside default_ops.hpp // +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:6326) // comparison of two constants +#endif + namespace detail{ template<typename T, typename U> @@ -160,7 +165,7 @@ void hyp1F0(T& H1F0, const T& a, const T& x) si_type n; T term, part; - static const unsigned series_limit = + static const si_type series_limit = boost::multiprecision::detail::digits2<number<T, et_on> >::value < 100 ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value; // Series expansion of hyperg_1f0(a; ; x). @@ -692,3 +697,6 @@ inline void eval_tanh(T& result, const T& x) eval_divide(result, c); } +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif diff --git a/boost/multiprecision/detail/functions/trig.hpp b/boost/multiprecision/detail/functions/trig.hpp index baa42be38c..5d4e2639c2 100644 --- a/boost/multiprecision/detail/functions/trig.hpp +++ b/boost/multiprecision/detail/functions/trig.hpp @@ -12,6 +12,11 @@ // This file has no include guards or namespaces - it's expanded inline inside default_ops.hpp // +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:6326) // comparison of two constants +#endif + template <class T> void hyp0F1(T& result, const T& b, const T& x) { @@ -494,12 +499,12 @@ void eval_asin(T& result, const T& x) // Newton-Raphson iteration while(current_digits < target_precision) { - T s, c; - eval_sin(s, result); - eval_cos(c, result); - eval_subtract(s, xx); - eval_divide(s, c); - eval_subtract(result, s); + T sine, cosine; + eval_sin(sine, result); + eval_cos(cosine, result); + eval_subtract(sine, xx); + eval_divide(sine, cosine); + eval_subtract(result, sine); current_digits *= 2; /* @@ -770,3 +775,6 @@ inline typename enable_if<is_arithmetic<A>, void>::type eval_atan2(T& result, co eval_atan2(result, c, a); } +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif |