From 25e5455b928a43dcc3700a835d939a84b628d2fd Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 21 Nov 2013 10:31:03 +0000 Subject: [PATCH] Fix min/max_exponent values (these should be base 10 not base 2 as before). [SVN r86778] --- include/boost/multiprecision/cpp_dec_float.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/multiprecision/cpp_dec_float.hpp b/include/boost/multiprecision/cpp_dec_float.hpp index 62cdfb718..67012f173 100644 --- a/include/boost/multiprecision/cpp_dec_float.hpp +++ b/include/boost/multiprecision/cpp_dec_float.hpp @@ -70,8 +70,8 @@ class cpp_dec_float static const boost::int32_t cpp_dec_float_digits10 = ((cpp_dec_float_digits10_setting < cpp_dec_float_digits10_limit_lo) ? cpp_dec_float_digits10_limit_lo : ((cpp_dec_float_digits10_setting > cpp_dec_float_digits10_limit_hi) ? cpp_dec_float_digits10_limit_hi : cpp_dec_float_digits10_setting)); static const ExponentType cpp_dec_float_max_exp10 = (static_cast(1) << (std::numeric_limits::digits - 5)); static const ExponentType cpp_dec_float_min_exp10 = -cpp_dec_float_max_exp10; - static const ExponentType cpp_dec_float_max_exp = static_cast((cpp_dec_float_max_exp10 / 301LL) * 1000LL); - static const ExponentType cpp_dec_float_min_exp = static_cast((cpp_dec_float_min_exp10 / 301LL) * 1000LL); + static const ExponentType cpp_dec_float_max_exp = cpp_dec_float_max_exp10; + static const ExponentType cpp_dec_float_min_exp = cpp_dec_float_min_exp10; BOOST_STATIC_ASSERT((cpp_dec_float::cpp_dec_float_max_exp10 == -cpp_dec_float::cpp_dec_float_min_exp10));