|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77759 - sandbox/big_number/boost/multiprecision
From: john_at_[hidden]
Date: 2012-04-04 13:10:40
Author: johnmaddock
Date: 2012-04-04 13:10:39 EDT (Wed, 04 Apr 2012)
New Revision: 77759
URL: http://svn.boost.org/trac/boost/changeset/77759
Log:
Change max_digits10 to allow some headroom for subsequent calculations.
Text files modified:
sandbox/big_number/boost/multiprecision/cpp_dec_float.hpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Modified: sandbox/big_number/boost/multiprecision/cpp_dec_float.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_dec_float.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_dec_float.hpp 2012-04-04 13:10:39 EDT (Wed, 04 Apr 2012)
@@ -40,7 +40,7 @@
static const boost::int32_t cpp_dec_float_digits = Digits10;
static const boost::int32_t cpp_dec_float_digits10_setting = Digits10;
- static const boost::int32_t cpp_dec_float_digits10_limit = boost::integer_traits<boost::int32_t>::const_max;
+ static const boost::int32_t cpp_dec_float_digits10_limit = boost::integer_traits<boost::int32_t>::const_max - 100;
static const boost::int32_t cpp_dec_float_digits10 = ((cpp_dec_float_digits10_setting < static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : ((cpp_dec_float_digits10_setting > cpp_dec_float_digits10_limit) ? cpp_dec_float_digits10_limit : cpp_dec_float_digits10_setting));
static const boost::int32_t cpp_dec_float_digits10_extra = static_cast<boost::int32_t>(((static_cast<boost::int64_t>(cpp_dec_float_digits10) * 15LL) + 50LL) / 100LL);
static const boost::int32_t cpp_dec_float_max_digits10 = static_cast<boost::int32_t>(cpp_dec_float_digits10 + ((cpp_dec_float_digits10_extra < static_cast<boost::int32_t>(5)) ? static_cast<boost::int32_t>(5) : ((cpp_dec_float_digits10_extra > static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : cpp_dec_float_digits10_extra)));
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