Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86778 - trunk/boost/multiprecision
From: john_at_[hidden]
Date: 2013-11-21 05:31:04


Author: johnmaddock
Date: 2013-11-21 05:31:03 EST (Thu, 21 Nov 2013)
New Revision: 86778
URL: http://svn.boost.org/trac/boost/changeset/86778

Log:
Fix min/max_exponent values (these should be base 10 not base 2 as before).

Text files modified:
   trunk/boost/multiprecision/cpp_dec_float.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/multiprecision/cpp_dec_float.hpp
==============================================================================
--- trunk/boost/multiprecision/cpp_dec_float.hpp Wed Nov 20 12:10:43 2013 (r86777)
+++ trunk/boost/multiprecision/cpp_dec_float.hpp 2013-11-21 05:31:03 EST (Thu, 21 Nov 2013) (r86778)
@@ -70,8 +70,8 @@
    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<ExponentType>(1) << (std::numeric_limits<ExponentType>::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<ExponentType>((cpp_dec_float_max_exp10 / 301LL) * 1000LL);
- static const ExponentType cpp_dec_float_min_exp = static_cast<ExponentType>((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<Digits10, ExponentType, Allocator>::cpp_dec_float_max_exp10 == -cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_min_exp10));
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk