mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-19 14:32:35 +00:00
Fix min/max_exponent values (these should be base 10 not base 2 as before).
[SVN r86778]
This commit is contained in:
@@ -70,8 +70,8 @@ public:
|
||||
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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user