|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75453 - in sandbox/big_number: boost/multiprecision libs/multiprecision/example libs/multiprecision/test
From: john_at_[hidden]
Date: 2011-11-12 08:15:36
Author: johnmaddock
Date: 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
New Revision: 75453
URL: http://svn.boost.org/trac/boost/changeset/75453
Log:
Search and replace - rename mp_float cpp_float.
Added:
sandbox/big_number/boost/multiprecision/cpp_float.hpp
- copied, changed from r75452, /sandbox/big_number/boost/multiprecision/mp_float.hpp
Text files modified:
sandbox/big_number/boost/multiprecision/cpp_float.hpp | 986 ++++++++++++++++++++--------------------
sandbox/big_number/boost/multiprecision/mp_float.hpp | 986 ++++++++++++++++++++--------------------
sandbox/big_number/libs/multiprecision/example/mp_float_snips.cpp | 10
sandbox/big_number/libs/multiprecision/test/Jamfile.v2 | 66 +-
sandbox/big_number/libs/multiprecision/test/linpack-benchmark.cpp | 16
sandbox/big_number/libs/multiprecision/test/mp_number_concept_check.cpp | 18
sandbox/big_number/libs/multiprecision/test/test_acos.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp | 12
sandbox/big_number/libs/multiprecision/test/test_asin.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_atan.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_cos.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_cosh.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_exp.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_fpclassify.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_log.cpp | 18
sandbox/big_number/libs/multiprecision/test/test_numeric_limits.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_pow.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_round.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_sin.cpp | 17
sandbox/big_number/libs/multiprecision/test/test_sinh.cpp | 14
sandbox/big_number/libs/multiprecision/test/test_tanh.cpp | 14
21 files changed, 1153 insertions(+), 1144 deletions(-)
Copied: sandbox/big_number/boost/multiprecision/cpp_float.hpp (from r75452, /sandbox/big_number/boost/multiprecision/mp_float.hpp)
==============================================================================
--- /sandbox/big_number/boost/multiprecision/mp_float.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_float.hpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -25,7 +25,7 @@
namespace multiprecision{
template <unsigned Digits10>
-class mp_float
+class cpp_float
{
public:
typedef mpl::list<long long> signed_types;
@@ -35,22 +35,22 @@
static const boost::int32_t mp_radix = 10;
- static const boost::int32_t mp_float_digits = Digits10;
+ static const boost::int32_t cpp_float_digits = Digits10;
- static const boost::int32_t mp_float_digits10_setting = Digits10;
- static const boost::int32_t mp_float_digits10_limit = boost::integer_traits<boost::int32_t>::const_max;
- static const boost::int32_t mp_float_digits10 = ((mp_float_digits10_setting < static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : ((mp_float_digits10_setting > mp_float_digits10_limit) ? mp_float_digits10_limit : mp_float_digits10_setting));
- static const boost::int32_t mp_float_digits10_extra = static_cast<boost::int32_t>(((static_cast<boost::int64_t>(mp_float_digits10) * 15LL) + 50LL) / 100LL);
- static const boost::int32_t mp_float_max_digits10 = static_cast<boost::int32_t>(mp_float_digits10 + ((mp_float_digits10_extra < static_cast<boost::int32_t>(5)) ? static_cast<boost::int32_t>(5) : ((mp_float_digits10_extra > static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : mp_float_digits10_extra)));
- static const boost::int64_t mp_float_max_exp = static_cast<boost::int64_t>(+9223372036854775795LL);
- static const boost::int64_t mp_float_min_exp = static_cast<boost::int64_t>(-9223372036854775795LL);
- static const boost::int64_t mp_float_max_exp10 = static_cast<boost::int64_t>(+3063937869882635616LL); // Approx. [mp_float_max_exp / log10(2)], also an even multiple of 8
- static const boost::int64_t mp_float_min_exp10 = static_cast<boost::int64_t>(-3063937869882635616LL);
+ static const boost::int32_t cpp_float_digits10_setting = Digits10;
+ static const boost::int32_t cpp_float_digits10_limit = boost::integer_traits<boost::int32_t>::const_max;
+ static const boost::int32_t cpp_float_digits10 = ((cpp_float_digits10_setting < static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : ((cpp_float_digits10_setting > cpp_float_digits10_limit) ? cpp_float_digits10_limit : cpp_float_digits10_setting));
+ static const boost::int32_t cpp_float_digits10_extra = static_cast<boost::int32_t>(((static_cast<boost::int64_t>(cpp_float_digits10) * 15LL) + 50LL) / 100LL);
+ static const boost::int32_t cpp_float_max_digits10 = static_cast<boost::int32_t>(cpp_float_digits10 + ((cpp_float_digits10_extra < static_cast<boost::int32_t>(5)) ? static_cast<boost::int32_t>(5) : ((cpp_float_digits10_extra > static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : cpp_float_digits10_extra)));
+ static const boost::int64_t cpp_float_max_exp = static_cast<boost::int64_t>(+9223372036854775795LL);
+ static const boost::int64_t cpp_float_min_exp = static_cast<boost::int64_t>(-9223372036854775795LL);
+ static const boost::int64_t cpp_float_max_exp10 = static_cast<boost::int64_t>(+3063937869882635616LL); // Approx. [cpp_float_max_exp / log10(2)], also an even multiple of 8
+ static const boost::int64_t cpp_float_min_exp10 = static_cast<boost::int64_t>(-3063937869882635616LL);
static const boost::int32_t mp_elem_digits10 = static_cast<boost::int32_t>(8);
private:
- static const boost::int32_t mp_float_digits10_num_base = static_cast<boost::int32_t>((mp_float_max_digits10 / mp_elem_digits10) + (((mp_float_max_digits10 % mp_elem_digits10) != 0) ? 1 : 0));
- static const boost::int32_t mp_elem_number = static_cast<boost::int32_t>(mp_float_digits10_num_base + 2);
+ static const boost::int32_t cpp_float_digits10_num_base = static_cast<boost::int32_t>((cpp_float_max_digits10 / mp_elem_digits10) + (((cpp_float_max_digits10 % mp_elem_digits10) != 0) ? 1 : 0));
+ static const boost::int32_t mp_elem_number = static_cast<boost::int32_t>(cpp_float_digits10_num_base + 2);
static const boost::int32_t mp_elem_mask = static_cast<boost::int32_t>(100000000);
typedef enum enum_fpclass
@@ -72,7 +72,7 @@
//
// Special values constructor:
//
- mp_float(t_fpclass c) :
+ cpp_float(t_fpclass c) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -86,23 +86,23 @@
{
initializer()
{
- mp_float<Digits10>::nan();
- mp_float<Digits10>::inf();
- (mp_float<Digits10>::min)();
- (mp_float<Digits10>::max)();
- mp_float<Digits10>::zero();
- mp_float<Digits10>::one();
- mp_float<Digits10>::two();
- mp_float<Digits10>::half();
- mp_float<Digits10>::double_min();
- mp_float<Digits10>::double_max();
- mp_float<Digits10>::long_double_max();
- mp_float<Digits10>::long_double_min();
- mp_float<Digits10>::long_long_max();
- mp_float<Digits10>::long_long_min();
- mp_float<Digits10>::ulong_long_max();
- mp_float<Digits10>::eps();
- mp_float<Digits10>::pow2(0);
+ cpp_float<Digits10>::nan();
+ cpp_float<Digits10>::inf();
+ (cpp_float<Digits10>::min)();
+ (cpp_float<Digits10>::max)();
+ cpp_float<Digits10>::zero();
+ cpp_float<Digits10>::one();
+ cpp_float<Digits10>::two();
+ cpp_float<Digits10>::half();
+ cpp_float<Digits10>::double_min();
+ cpp_float<Digits10>::double_max();
+ cpp_float<Digits10>::long_double_max();
+ cpp_float<Digits10>::long_double_min();
+ cpp_float<Digits10>::long_long_max();
+ cpp_float<Digits10>::long_long_min();
+ cpp_float<Digits10>::ulong_long_max();
+ cpp_float<Digits10>::eps();
+ cpp_float<Digits10>::pow2(0);
}
void do_nothing(){}
};
@@ -111,14 +111,14 @@
public:
// Constructors
- mp_float() :
+ cpp_float() :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
fpclass (mp_finite),
prec_elem(mp_elem_number) { }
- mp_float(const char* s) :
+ cpp_float(const char* s) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -129,7 +129,7 @@
}
template<class I>
- mp_float(I i, typename enable_if<is_unsigned<I> >::type* = 0) :
+ cpp_float(I i, typename enable_if<is_unsigned<I> >::type* = 0) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -140,7 +140,7 @@
}
template <class I>
- mp_float(I i, typename enable_if<is_signed<I> >::type* = 0) :
+ cpp_float(I i, typename enable_if<is_signed<I> >::type* = 0) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -156,7 +156,7 @@
from_unsigned_long_long(i);
}
- mp_float(const mp_float& f) :
+ cpp_float(const cpp_float& f) :
data (f.data),
exp (f.exp),
neg (f.neg),
@@ -164,7 +164,7 @@
prec_elem(f.prec_elem) { }
template <class F>
- mp_float(const F val, typename enable_if<is_floating_point<F> >::type* = 0):
+ cpp_float(const F val, typename enable_if<is_floating_point<F> >::type* = 0):
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -174,28 +174,28 @@
*this = val;
}
- mp_float(const double val, long long exponent);
+ cpp_float(const double val, long long exponent);
// Specific special values.
- static const mp_float& nan()
+ static const cpp_float& nan()
{
- static const mp_float val(mp_NaN);
+ static const cpp_float val(mp_NaN);
init.do_nothing();
return val;
}
- static const mp_float& inf()
+ static const cpp_float& inf()
{
- static const mp_float val(mp_inf);
+ static const cpp_float val(mp_inf);
init.do_nothing();
return val;
}
- static const mp_float& (max)()
+ static const cpp_float& (max)()
{
init.do_nothing();
static bool init = false;
- static const std::string str_max = std::string("9." + std::string(static_cast<std::size_t>(mp_float_max_digits10), static_cast<char>('9')))
- + std::string("e+" + boost::lexical_cast<std::string>(mp_float_max_exp10));
- static mp_float val_max;
+ static const std::string str_max = std::string("9." + std::string(static_cast<std::size_t>(cpp_float_max_digits10), static_cast<char>('9')))
+ + std::string("e+" + boost::lexical_cast<std::string>(cpp_float_max_exp10));
+ static cpp_float val_max;
if(!init)
{
init = true;
@@ -204,93 +204,93 @@
return val_max;
}
- static const mp_float& (min)()
+ static const cpp_float& (min)()
{
init.do_nothing();
static bool init = false;
- static mp_float val_min;
+ static cpp_float val_min;
if(!init)
{
init = true;
- val_min = std::string("1.0e" + boost::lexical_cast<std::string>(mp_float_min_exp10)).c_str();
+ val_min = std::string("1.0e" + boost::lexical_cast<std::string>(cpp_float_min_exp10)).c_str();
}
return val_min;
}
- static const mp_float& zero()
+ static const cpp_float& zero()
{
init.do_nothing();
- static mp_float val(static_cast<unsigned long long>(0u));
+ static cpp_float val(static_cast<unsigned long long>(0u));
return val;
}
- static const mp_float& one()
+ static const cpp_float& one()
{
init.do_nothing();
- static mp_float val(static_cast<unsigned long long>(1u));
+ static cpp_float val(static_cast<unsigned long long>(1u));
return val;
}
- static const mp_float& two()
+ static const cpp_float& two()
{
init.do_nothing();
- static mp_float val(static_cast<unsigned long long>(2u));
+ static cpp_float val(static_cast<unsigned long long>(2u));
return val;
}
- static const mp_float& half()
+ static const cpp_float& half()
{
init.do_nothing();
- static mp_float val(0.5L);
+ static cpp_float val(0.5L);
return val;
}
- static const mp_float& double_min()
+ static const cpp_float& double_min()
{
init.do_nothing();
- static mp_float val(static_cast<long double>((std::numeric_limits<double>::min)()));
+ static cpp_float val(static_cast<long double>((std::numeric_limits<double>::min)()));
return val;
}
- static const mp_float& double_max()
+ static const cpp_float& double_max()
{
init.do_nothing();
- static mp_float val(static_cast<long double>((std::numeric_limits<double>::max)()));
+ static cpp_float val(static_cast<long double>((std::numeric_limits<double>::max)()));
return val;
}
- static const mp_float& long_double_min()
+ static const cpp_float& long_double_min()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long double>::min)());
+ static cpp_float val((std::numeric_limits<long double>::min)());
return val;
}
- static const mp_float& long_double_max()
+ static const cpp_float& long_double_max()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long double>::max)());
+ static cpp_float val((std::numeric_limits<long double>::max)());
return val;
}
- static const mp_float& long_long_max()
+ static const cpp_float& long_long_max()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long long>::max)());
+ static cpp_float val((std::numeric_limits<long long>::max)());
return val;
}
- static const mp_float& long_long_min()
+ static const cpp_float& long_long_min()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long long>::min)());
+ static cpp_float val((std::numeric_limits<long long>::min)());
return val;
}
- static const mp_float& ulong_long_max()
+ static const cpp_float& ulong_long_max()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<unsigned long long>::max)());
+ static cpp_float val((std::numeric_limits<unsigned long long>::max)());
return val;
}
- static const mp_float& eps()
+ static const cpp_float& eps()
{
init.do_nothing();
- static mp_float val(1.0, 1 - (int)Digits10);
+ static cpp_float val(1.0, 1 - (int)Digits10);
return val;
}
// Basic operations.
- mp_float& operator= (const mp_float& v)
+ cpp_float& operator= (const cpp_float& v)
{
data = v.data;
exp = v.exp;
@@ -299,7 +299,7 @@
prec_elem = v.prec_elem;
return *this;
}
- mp_float& operator= (long long v)
+ cpp_float& operator= (long long v)
{
if(v < 0)
{
@@ -310,41 +310,41 @@
from_unsigned_long_long(v);
return *this;
}
- mp_float& operator= (unsigned long long v)
+ cpp_float& operator= (unsigned long long v)
{
from_unsigned_long_long(v);
return *this;
}
- mp_float& operator= (long double v);
- mp_float& operator= (const char* v)
+ cpp_float& operator= (long double v);
+ cpp_float& operator= (const char* v)
{
rd_string(v);
return *this;
}
- mp_float& operator+=(const mp_float& v);
- mp_float& operator-=(const mp_float& v);
- mp_float& operator*=(const mp_float& v);
- mp_float& operator/=(const mp_float& v);
+ cpp_float& operator+=(const cpp_float& v);
+ cpp_float& operator-=(const cpp_float& v);
+ cpp_float& operator*=(const cpp_float& v);
+ cpp_float& operator/=(const cpp_float& v);
- mp_float& add_unsigned_long_long(const unsigned long long n)
+ cpp_float& add_unsigned_long_long(const unsigned long long n)
{
- mp_float t;
+ cpp_float t;
t.from_unsigned_long_long(n);
return *this += t;
}
- mp_float& sub_unsigned_long_long(const unsigned long long n)
+ cpp_float& sub_unsigned_long_long(const unsigned long long n)
{
- mp_float t;
+ cpp_float t;
t.from_unsigned_long_long(n);
return *this -= t;
}
- mp_float& mul_unsigned_long_long(const unsigned long long n);
- mp_float& div_unsigned_long_long(const unsigned long long n);
+ cpp_float& mul_unsigned_long_long(const unsigned long long n);
+ cpp_float& div_unsigned_long_long(const unsigned long long n);
// Elementary primitives.
- mp_float& calculate_inv (void);
- mp_float& calculate_sqrt(void);
+ cpp_float& calculate_inv (void);
+ cpp_float& calculate_sqrt(void);
void negate()
{
if(!iszero())
@@ -365,27 +365,27 @@
bool isneg (void) const { return neg; }
// Operators pre-increment and pre-decrement
- mp_float& operator++(void)
+ cpp_float& operator++(void)
{
return *this += one();
}
- mp_float& operator--(void)
+ cpp_float& operator--(void)
{
return *this -= one();
}
std::string str(unsigned digits, bool scientific)const;
- int compare(const mp_float& v)const;
+ int compare(const cpp_float& v)const;
template <class V>
int compare(const V& v)const
{
- mp_float<Digits10> t;
+ cpp_float<Digits10> t;
t = v;
return compare(t);
}
- void swap(mp_float& v)
+ void swap(cpp_float& v)
{
data.swap(v.data);
std::swap(exp, v.exp);
@@ -399,10 +399,10 @@
signed long long extract_signed_long_long (void) const;
unsigned long long extract_unsigned_long_long(void) const;
void extract_parts (double& mantissa, boost::int64_t& exponent) const;
- mp_float extract_integer_part (void) const;
+ cpp_float extract_integer_part (void) const;
void precision(const boost::int32_t prec_digits)
{
- if(prec_digits >= mp_float_digits10)
+ if(prec_digits >= cpp_float_digits10)
{
prec_elem = mp_elem_number;
}
@@ -414,7 +414,7 @@
prec_elem = (std::min)(mp_elem_number, (std::max)(elems, static_cast<boost::int32_t>(2)));
}
}
- static mp_float pow2(long long i);
+ static cpp_float pow2(long long i);
long long order()const
{
const bool bo_order_is_zero = ((!isfinite()) || (data[0] == static_cast<boost::uint32_t>(0u)));
@@ -469,7 +469,7 @@
private:
static bool data_elem_is_non_zero_predicate(const boost::uint32_t& d) { return (d != static_cast<boost::uint32_t>(0u)); }
- static bool data_elem_is_non_nine_predicate(const boost::uint32_t& d) { return (d != static_cast<boost::uint32_t>(mp_float::mp_elem_mask - 1)); }
+ static bool data_elem_is_non_nine_predicate(const boost::uint32_t& d) { return (d != static_cast<boost::uint32_t>(cpp_float::mp_elem_mask - 1)); }
static bool char_is_nonzero_predicate(const char& c) { return (c != static_cast<char>('0')); }
void from_unsigned_long_long(const unsigned long long u);
@@ -484,42 +484,42 @@
};
template <unsigned Digits10>
-typename mp_float<Digits10>::initializer mp_float<Digits10>::init;
+typename cpp_float<Digits10>::initializer cpp_float<Digits10>::init;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_radix;
+const boost::int32_t cpp_float<Digits10>::mp_radix;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_setting;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_setting;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_limit;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_limit;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_extra;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_extra;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_max_digits10;
+const boost::int32_t cpp_float<Digits10>::cpp_float_max_digits10;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_max_exp;
+const boost::int64_t cpp_float<Digits10>::cpp_float_max_exp;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_min_exp;
+const boost::int64_t cpp_float<Digits10>::cpp_float_min_exp;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_max_exp10;
+const boost::int64_t cpp_float<Digits10>::cpp_float_max_exp10;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_min_exp10;
+const boost::int64_t cpp_float<Digits10>::cpp_float_min_exp10;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_elem_digits10;
+const boost::int32_t cpp_float<Digits10>::mp_elem_digits10;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_num_base;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_num_base;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_elem_number;
+const boost::int32_t cpp_float<Digits10>::mp_elem_number;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_elem_mask;
+const boost::int32_t cpp_float<Digits10>::mp_elem_mask;
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator+=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator+=(const cpp_float<Digits10>& v)
{
if(isnan())
{
@@ -709,13 +709,13 @@
return *this = zero();
}
- bool overflow = exp >= mp_float_max_exp;
- if(exp == mp_float_max_exp)
+ bool overflow = exp >= cpp_float_max_exp;
+ if(exp == cpp_float_max_exp)
{
// Check to see if we really truely have an overflow or not...
if(isneg())
{
- mp_float t(*this);
+ cpp_float t(*this);
t.negate();
overflow = t.compare((max)()) > 0;
}
@@ -739,7 +739,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator-=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator-=(const cpp_float<Digits10>& v)
{
// Use *this - v = -(-*this + v).
negate();
@@ -749,7 +749,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator*=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator*=(const cpp_float<Digits10>& v)
{
// Evaluate the sign of the result.
const bool b_result_is_neg = (neg != v.neg);
@@ -796,7 +796,7 @@
const boost::int64_t v_exp = ((!v_exp_is_neg) ? v.exp : static_cast<boost::int64_t>(-v.exp));
// Check the range of the upcoming multiplication.
- const bool b_result_is_out_of_range = (v_exp >= static_cast<boost::int64_t>(mp_float_max_exp10 - u_exp));
+ const bool b_result_is_out_of_range = (v_exp >= static_cast<boost::int64_t>(cpp_float_max_exp10 - u_exp));
if(b_result_is_out_of_range)
{
@@ -841,7 +841,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator/=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator/=(const cpp_float<Digits10>& v)
{
const bool u_and_v_are_finite_and_identical = ( isfinite()
&& (fpclass == v.fpclass)
@@ -865,14 +865,14 @@
}
return *this;
}
- mp_float t(v);
+ cpp_float t(v);
t.calculate_inv();
return operator*=(t);
}
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::mul_unsigned_long_long(const unsigned long long n)
+cpp_float<Digits10>& cpp_float<Digits10>::mul_unsigned_long_long(const unsigned long long n)
{
// Multiply *this with a constant unsigned long long.
@@ -908,7 +908,7 @@
if(n >= static_cast<unsigned long long>(mp_elem_mask))
{
neg = b_neg;
- mp_float t;
+ cpp_float t;
t = n;
return operator*=(t);
}
@@ -936,13 +936,13 @@
data.front() = static_cast<boost::uint32_t>(carry);
}
- bool overflow = exp >= mp_float_max_exp;
- if(exp == mp_float_max_exp)
+ bool overflow = exp >= cpp_float_max_exp;
+ if(exp == cpp_float_max_exp)
{
// Check to see if we really truely have an overflow or not...
if(isneg())
{
- mp_float t(*this);
+ cpp_float t(*this);
t.negate();
overflow = t.compare((max)()) > 0;
}
@@ -967,7 +967,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::div_unsigned_long_long(const unsigned long long n)
+cpp_float<Digits10>& cpp_float<Digits10>::div_unsigned_long_long(const unsigned long long n)
{
// Divide *this by a constant unsigned long long.
@@ -1016,7 +1016,7 @@
if(n >= static_cast<unsigned long long>(mp_elem_mask))
{
neg = b_neg;
- mp_float t;
+ cpp_float t;
t = n;
return operator/=(t);
}
@@ -1056,7 +1056,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::calculate_inv()
+cpp_float<Digits10>& cpp_float<Digits10>::calculate_inv()
{
// Compute the inverse of *this.
const bool b_neg = neg;
@@ -1090,7 +1090,7 @@
}
// Save the original *this.
- mp_float<Digits10> x(*this);
+ cpp_float<Digits10> x(*this);
// Generate the initial estimate using division.
// Extract the mantissa and exponent for a "manual"
@@ -1100,7 +1100,7 @@
x.extract_parts(dd, ne);
// Do the inverse estimate using double precision estimates of mantissa and exponent.
- operator=(mp_float<Digits10>(1.0 / dd, -ne));
+ operator=(cpp_float<Digits10>(1.0 / dd, -ne));
// Compute the inverse of *this. Quadratically convergent Newton-Raphson iteration
// is used. During the iterative steps, the precision of the calculation is limited
@@ -1115,7 +1115,7 @@
x.precision(static_cast<boost::int32_t>(digits * static_cast<boost::int32_t>(2)));
// Next iteration.
- mp_float t(*this);
+ cpp_float t(*this);
t *= x;
t -= two();
t.negate();
@@ -1130,7 +1130,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::calculate_sqrt(void)
+cpp_float<Digits10>& cpp_float<Digits10>::calculate_sqrt(void)
{
// Compute the square root of *this.
@@ -1146,7 +1146,7 @@
}
// Save the original *this.
- mp_float<Digits10> x(*this);
+ cpp_float<Digits10> x(*this);
// Generate the initial estimate using division.
// Extract the mantissa and exponent for a "manual"
@@ -1166,10 +1166,10 @@
// Estimate the square root using simple manipulations.
const double sqd = std::sqrt(dd);
- *this = mp_float<Digits10>(sqd, static_cast<boost::int64_t>(ne / static_cast<boost::int64_t>(2)));
+ *this = cpp_float<Digits10>(sqd, static_cast<boost::int64_t>(ne / static_cast<boost::int64_t>(2)));
// Estimate 1.0 / (2.0 * x0) using simple manipulations.
- mp_float<Digits10> vi(0.5 / sqd, static_cast<boost::int64_t>(-ne / static_cast<boost::int64_t>(2)));
+ cpp_float<Digits10> vi(0.5 / sqd, static_cast<boost::int64_t>(-ne / static_cast<boost::int64_t>(2)));
// Compute the square root of x. Coupled Newton iteration
// as described in "Pi Unleashed" is used. During the
@@ -1190,7 +1190,7 @@
vi.precision(digits * 2);
// Next iteration of vi
- mp_float t(*this);
+ cpp_float t(*this);
t *= vi;
t.negate();
t.mul_unsigned_long_long(2u);
@@ -1213,7 +1213,7 @@
}
template <unsigned Digits10>
-int mp_float<Digits10>::cmp_data(const array_type& vd) const
+int cpp_float<Digits10>::cmp_data(const array_type& vd) const
{
// Compare the data of *this with those of v.
// Return +1 for *this > v
@@ -1235,7 +1235,7 @@
}
template <unsigned Digits10>
-int mp_float<Digits10>::compare(const mp_float& v) const
+int cpp_float<Digits10>::compare(const cpp_float& v) const
{
// Compare v with *this.
// Return +1 for *this > v
@@ -1313,7 +1313,7 @@
}
template <unsigned Digits10>
-bool mp_float<Digits10>::isone() const
+bool cpp_float<Digits10>::isone() const
{
// Check if the value of *this is identically 1 or very close to 1.
@@ -1337,7 +1337,7 @@
}
template <unsigned Digits10>
-bool mp_float<Digits10>::isint() const
+bool cpp_float<Digits10>::isint() const
{
if(fpclass != mp_finite) { return false; }
@@ -1360,9 +1360,9 @@
}
template <unsigned Digits10>
-void mp_float<Digits10>::extract_parts(double& mantissa, boost::int64_t& exponent) const
+void cpp_float<Digits10>::extract_parts(double& mantissa, boost::int64_t& exponent) const
{
- // Extract the approximate parts mantissa and base-10 exponent from the input mp_float<Digits10> value x.
+ // Extract the approximate parts mantissa and base-10 exponent from the input cpp_float<Digits10> value x.
// Extracts the mantissa and exponent.
exponent = exp;
@@ -1393,11 +1393,11 @@
}
template <unsigned Digits10>
-double mp_float<Digits10>::extract_double(void) const
+double cpp_float<Digits10>::extract_double(void) const
{
- // Returns the double conversion of a mp_float<Digits10>.
+ // Returns the double conversion of a cpp_float<Digits10>.
- // Check for non-normal mp_float<Digits10>.
+ // Check for non-normal cpp_float<Digits10>.
if(!isfinite())
{
if(isnan())
@@ -1411,17 +1411,17 @@
}
}
- mp_float<Digits10> xx(*this);
+ cpp_float<Digits10> xx(*this);
if(xx.isneg())
xx.negate();
- // Check for zero mp_float<Digits10>.
+ // Check for zero cpp_float<Digits10>.
if(iszero() || (xx.compare(double_min()) < 0))
{
return 0.0;
}
- // Check if mp_float<Digits10> exceeds the maximum of double.
+ // Check if cpp_float<Digits10> exceeds the maximum of double.
if(xx.compare(double_max()) > 0)
{
return ((!neg) ? std::numeric_limits<double>::infinity()
@@ -1439,11 +1439,11 @@
}
template <unsigned Digits10>
-long double mp_float<Digits10>::extract_long_double(void) const
+long double cpp_float<Digits10>::extract_long_double(void) const
{
- // Returns the long double conversion of a mp_float<Digits10>.
+ // Returns the long double conversion of a cpp_float<Digits10>.
- // Check for non-normal mp_float<Digits10>.
+ // Check for non-normal cpp_float<Digits10>.
if(!isfinite())
{
if(isnan())
@@ -1457,17 +1457,17 @@
}
}
- mp_float<Digits10> xx(*this);
+ cpp_float<Digits10> xx(*this);
if(xx.isneg())
xx.negate();
- // Check for zero mp_float<Digits10>.
+ // Check for zero cpp_float<Digits10>.
if(iszero() || (xx.compare(long_double_min()) < 0))
{
return static_cast<long double>(0.0);
}
- // Check if mp_float<Digits10> exceeds the maximum of double.
+ // Check if cpp_float<Digits10> exceeds the maximum of double.
if(xx.compare(long_double_max()) > 0)
{
return ((!neg) ? std::numeric_limits<long double>::infinity()
@@ -1485,7 +1485,7 @@
}
template <unsigned Digits10>
-signed long long mp_float<Digits10>::extract_signed_long_long(void) const
+signed long long cpp_float<Digits10>::extract_signed_long_long(void) const
{
// Extracts a signed long long from *this.
// If (x > maximum of signed long long) or (x < minimum of signed long long),
@@ -1511,7 +1511,7 @@
else
{
// Extract the data into an unsigned long long value.
- mp_float<Digits10> xn(extract_integer_part());
+ cpp_float<Digits10> xn(extract_integer_part());
if(xn.isneg())
xn.negate();
@@ -1530,7 +1530,7 @@
}
template <unsigned Digits10>
-unsigned long long mp_float<Digits10>::extract_unsigned_long_long(void) const
+unsigned long long cpp_float<Digits10>::extract_unsigned_long_long(void) const
{
// Extracts an unsigned long long from *this.
// If x exceeds the maximum of unsigned long long,
@@ -1548,7 +1548,7 @@
return static_cast<unsigned long long>(0u);
}
- const mp_float<Digits10> xn(extract_integer_part());
+ const cpp_float<Digits10> xn(extract_integer_part());
unsigned long long val;
@@ -1574,7 +1574,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10> mp_float<Digits10>::extract_integer_part(void) const
+cpp_float<Digits10> cpp_float<Digits10>::extract_integer_part(void) const
{
// Compute the signed integer part of x.
@@ -1597,7 +1597,7 @@
}
// Make a local copy.
- mp_float<Digits10> x = *this;
+ cpp_float<Digits10> x = *this;
// Clear out the decimal portion
const size_t first_clear = (static_cast<size_t>(x.exp) / static_cast<size_t>(mp_elem_digits10)) + 1u;
@@ -1609,20 +1609,20 @@
}
template <unsigned Digits10>
-std::string mp_float<Digits10>::str(std::size_t number_of_digits, bool scientific) const
+std::string cpp_float<Digits10>::str(std::size_t number_of_digits, bool scientific) const
{
std::string str;
boost::int64_t my_exp = order();
if(number_of_digits == 0)
number_of_digits = (std::numeric_limits<std::size_t>::max)();
- // Determine the number of elements needed to provide the requested digits from mp_float<Digits10>.
+ // Determine the number of elements needed to provide the requested digits from cpp_float<Digits10>.
const std::size_t number_of_elements = (std::min)(static_cast<std::size_t>((number_of_digits / static_cast<std::size_t>(mp_elem_digits10)) + 2u),
static_cast<std::size_t>(mp_elem_number));
- // Extract the remaining digits from mp_float<Digits10> after the decimal point.
+ // Extract the remaining digits from cpp_float<Digits10> after the decimal point.
str = boost::lexical_cast<std::string>(data[0]);
- // Extract all of the digits from mp_float<Digits10>, beginning with the first data element.
+ // Extract all of the digits from cpp_float<Digits10>, beginning with the first data element.
for(std::size_t i = static_cast<std::size_t>(1u); i < number_of_elements; i++)
{
std::stringstream ss;
@@ -1714,7 +1714,7 @@
}
template <unsigned Digits10>
-bool mp_float<Digits10>::rd_string(const char* const s)
+bool cpp_float<Digits10>::rd_string(const char* const s)
{
std::string str(s);
@@ -1764,7 +1764,7 @@
}
}
- // Put the input string into the standard mp_float<Digits10> input form
+ // Put the input string into the standard cpp_float<Digits10> input form
// aaa.bbbbE+/-n, where aa has 1...mp_elem_digits10, bbbb has an
// even multiple of mp_elem_digits10 which are possibly zero padded
// on the right-end, and n is a signed 32-bit integer which is an
@@ -1892,7 +1892,7 @@
static_cast<std::size_t>(pos_plus_one + max_dec));
}
- // Now the input string has the standard mp_float<Digits10> input form.
+ // Now the input string has the standard cpp_float<Digits10> input form.
// (See the comment above.)
// Set all the data elements to 0.
@@ -1916,7 +1916,7 @@
}
// Check for overflow...
- if(exp > mp_float_max_exp10)
+ if(exp > cpp_float_max_exp10)
{
const bool b_result_is_neg = neg;
@@ -1926,12 +1926,12 @@
}
// ...and check for underflow.
- if(exp <= mp_float_min_exp10)
+ if(exp <= cpp_float_min_exp10)
{
- if(exp == mp_float_min_exp10)
+ if(exp == cpp_float_min_exp10)
{
// Check for identity with the minimum value.
- mp_float<Digits10> test = *this;
+ cpp_float<Digits10> test = *this;
test.exp = static_cast<boost::int64_t>(0);
@@ -1950,14 +1950,14 @@
}
template <unsigned Digits10>
-mp_float<Digits10>::mp_float(const double mantissa, const boost::int64_t exponent)
+cpp_float<Digits10>::cpp_float(const double mantissa, const boost::int64_t exponent)
: data (),
exp (static_cast<boost::int64_t>(0)),
neg (false),
fpclass (mp_finite),
prec_elem(mp_elem_number)
{
- // Create an mp_float<Digits10> from mantissa and exponent.
+ // Create an cpp_float<Digits10> from mantissa and exponent.
// This ctor does not maintain the full precision of double.
const bool mantissa_is_iszero = (::fabs(mantissa) < ((std::numeric_limits<double>::min)() * (1.0 + std::numeric_limits<double>::epsilon())));
@@ -2002,7 +2002,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator = (long double a)
+cpp_float<Digits10>& cpp_float<Digits10>::operator = (long double a)
{
// Christopher Kormanyos's original code used a cast to long long here, but that fails
// when long double has more digits than a long long.
@@ -2052,7 +2052,7 @@
}
template <unsigned Digits10>
-void mp_float<Digits10>::from_unsigned_long_long(const unsigned long long u)
+void cpp_float<Digits10>::from_unsigned_long_long(const unsigned long long u)
{
std::fill(data.begin(), data.end(), static_cast<boost::uint32_t>(0u));
@@ -2084,7 +2084,7 @@
}
template <unsigned Digits10>
-void mp_float<Digits10>::mul_loop_uv(const boost::uint32_t* const u, const boost::uint32_t* const v, boost::uint32_t* const w, const boost::int32_t p)
+void cpp_float<Digits10>::mul_loop_uv(const boost::uint32_t* const u, const boost::uint32_t* const v, boost::uint32_t* const w, const boost::int32_t p)
{
boost::uint64_t carry = static_cast<boost::uint64_t>(0u);
@@ -2105,7 +2105,7 @@
}
template <unsigned Digits10>
-boost::uint32_t mp_float<Digits10>::mul_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
+boost::uint32_t cpp_float<Digits10>::mul_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
{
boost::uint64_t carry = static_cast<boost::uint64_t>(0u);
@@ -2121,7 +2121,7 @@
}
template <unsigned Digits10>
-boost::uint32_t mp_float<Digits10>::div_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
+boost::uint32_t cpp_float<Digits10>::div_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
{
boost::uint64_t prev = static_cast<boost::uint64_t>(0u);
@@ -2136,269 +2136,269 @@
}
template <unsigned Digits10>
-mp_float<Digits10> mp_float<Digits10>::pow2(const boost::int64_t p)
+cpp_float<Digits10> cpp_float<Digits10>::pow2(const boost::int64_t p)
{
// Create a static const table of p^2 for -128 < p < +128.
// Note: The size of this table must be odd-numbered and
// symmetric about 0.
init.do_nothing();
- static const boost::array<mp_float<Digits10>, 255u> p2_data =
+ static const boost::array<cpp_float<Digits10>, 255u> p2_data =
{{
- mp_float("5.877471754111437539843682686111228389093327783860437607543758531392086297273635864257812500000000000e-39"),
- mp_float("1.175494350822287507968736537222245677818665556772087521508751706278417259454727172851562500000000000e-38"),
- mp_float("2.350988701644575015937473074444491355637331113544175043017503412556834518909454345703125000000000000e-38"),
- mp_float("4.701977403289150031874946148888982711274662227088350086035006825113669037818908691406250000000000000e-38"),
- mp_float("9.403954806578300063749892297777965422549324454176700172070013650227338075637817382812500000000000000e-38"),
- mp_float("1.880790961315660012749978459555593084509864890835340034414002730045467615127563476562500000000000000e-37"),
- mp_float("3.761581922631320025499956919111186169019729781670680068828005460090935230255126953125000000000000000e-37"),
- mp_float("7.523163845262640050999913838222372338039459563341360137656010920181870460510253906250000000000000000e-37"),
- mp_float("1.504632769052528010199982767644474467607891912668272027531202184036374092102050781250000000000000000e-36"),
- mp_float("3.009265538105056020399965535288948935215783825336544055062404368072748184204101562500000000000000000e-36"),
- mp_float("6.018531076210112040799931070577897870431567650673088110124808736145496368408203125000000000000000000e-36"),
- mp_float("1.203706215242022408159986214115579574086313530134617622024961747229099273681640625000000000000000000e-35"),
- mp_float("2.407412430484044816319972428231159148172627060269235244049923494458198547363281250000000000000000000e-35"),
- mp_float("4.814824860968089632639944856462318296345254120538470488099846988916397094726562500000000000000000000e-35"),
- mp_float("9.629649721936179265279889712924636592690508241076940976199693977832794189453125000000000000000000000e-35"),
- mp_float("1.925929944387235853055977942584927318538101648215388195239938795566558837890625000000000000000000000e-34"),
- mp_float("3.851859888774471706111955885169854637076203296430776390479877591133117675781250000000000000000000000e-34"),
- mp_float("7.703719777548943412223911770339709274152406592861552780959755182266235351562500000000000000000000000e-34"),
- mp_float("1.540743955509788682444782354067941854830481318572310556191951036453247070312500000000000000000000000e-33"),
- mp_float("3.081487911019577364889564708135883709660962637144621112383902072906494140625000000000000000000000000e-33"),
- mp_float("6.162975822039154729779129416271767419321925274289242224767804145812988281250000000000000000000000000e-33"),
- mp_float("1.232595164407830945955825883254353483864385054857848444953560829162597656250000000000000000000000000e-32"),
- mp_float("2.465190328815661891911651766508706967728770109715696889907121658325195312500000000000000000000000000e-32"),
- mp_float("4.930380657631323783823303533017413935457540219431393779814243316650390625000000000000000000000000000e-32"),
- mp_float("9.860761315262647567646607066034827870915080438862787559628486633300781250000000000000000000000000000e-32"),
- mp_float("1.972152263052529513529321413206965574183016087772557511925697326660156250000000000000000000000000000e-31"),
- mp_float("3.944304526105059027058642826413931148366032175545115023851394653320312500000000000000000000000000000e-31"),
- mp_float("7.888609052210118054117285652827862296732064351090230047702789306640625000000000000000000000000000000e-31"),
- mp_float("1.577721810442023610823457130565572459346412870218046009540557861328125000000000000000000000000000000e-30"),
- mp_float("3.155443620884047221646914261131144918692825740436092019081115722656250000000000000000000000000000000e-30"),
- mp_float("6.310887241768094443293828522262289837385651480872184038162231445312500000000000000000000000000000000e-30"),
- mp_float("1.262177448353618888658765704452457967477130296174436807632446289062500000000000000000000000000000000e-29"),
- mp_float("2.524354896707237777317531408904915934954260592348873615264892578125000000000000000000000000000000000e-29"),
- mp_float("5.048709793414475554635062817809831869908521184697747230529785156250000000000000000000000000000000000e-29"),
- mp_float("1.009741958682895110927012563561966373981704236939549446105957031250000000000000000000000000000000000e-28"),
- mp_float("2.019483917365790221854025127123932747963408473879098892211914062500000000000000000000000000000000000e-28"),
- mp_float("4.038967834731580443708050254247865495926816947758197784423828125000000000000000000000000000000000000e-28"),
- mp_float("8.077935669463160887416100508495730991853633895516395568847656250000000000000000000000000000000000000e-28"),
- mp_float("1.615587133892632177483220101699146198370726779103279113769531250000000000000000000000000000000000000e-27"),
- mp_float("3.231174267785264354966440203398292396741453558206558227539062500000000000000000000000000000000000000e-27"),
- mp_float("6.462348535570528709932880406796584793482907116413116455078125000000000000000000000000000000000000000e-27"),
- mp_float("1.292469707114105741986576081359316958696581423282623291015625000000000000000000000000000000000000000e-26"),
- mp_float("2.584939414228211483973152162718633917393162846565246582031250000000000000000000000000000000000000000e-26"),
- mp_float("5.169878828456422967946304325437267834786325693130493164062500000000000000000000000000000000000000000e-26"),
- mp_float("1.033975765691284593589260865087453566957265138626098632812500000000000000000000000000000000000000000e-25"),
- mp_float("2.067951531382569187178521730174907133914530277252197265625000000000000000000000000000000000000000000e-25"),
- mp_float("4.135903062765138374357043460349814267829060554504394531250000000000000000000000000000000000000000000e-25"),
- mp_float("8.271806125530276748714086920699628535658121109008789062500000000000000000000000000000000000000000000e-25"),
- mp_float("1.654361225106055349742817384139925707131624221801757812500000000000000000000000000000000000000000000e-24"),
- mp_float("3.308722450212110699485634768279851414263248443603515625000000000000000000000000000000000000000000000e-24"),
- mp_float("6.617444900424221398971269536559702828526496887207031250000000000000000000000000000000000000000000000e-24"),
- mp_float("1.323488980084844279794253907311940565705299377441406250000000000000000000000000000000000000000000000e-23"),
- mp_float("2.646977960169688559588507814623881131410598754882812500000000000000000000000000000000000000000000000e-23"),
- mp_float("5.293955920339377119177015629247762262821197509765625000000000000000000000000000000000000000000000000e-23"),
- mp_float("1.058791184067875423835403125849552452564239501953125000000000000000000000000000000000000000000000000e-22"),
- mp_float("2.117582368135750847670806251699104905128479003906250000000000000000000000000000000000000000000000000e-22"),
- mp_float("4.235164736271501695341612503398209810256958007812500000000000000000000000000000000000000000000000000e-22"),
- mp_float("8.470329472543003390683225006796419620513916015625000000000000000000000000000000000000000000000000000e-22"),
- mp_float("1.694065894508600678136645001359283924102783203125000000000000000000000000000000000000000000000000000e-21"),
- mp_float("3.388131789017201356273290002718567848205566406250000000000000000000000000000000000000000000000000000e-21"),
- mp_float("6.776263578034402712546580005437135696411132812500000000000000000000000000000000000000000000000000000e-21"),
- mp_float("1.355252715606880542509316001087427139282226562500000000000000000000000000000000000000000000000000000e-20"),
- mp_float("2.710505431213761085018632002174854278564453125000000000000000000000000000000000000000000000000000000e-20"),
- mp_float("5.421010862427522170037264004349708557128906250000000000000000000000000000000000000000000000000000000e-20"),
- mp_float("1.084202172485504434007452800869941711425781250000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("2.168404344971008868014905601739883422851562500000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("4.336808689942017736029811203479766845703125000000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("8.673617379884035472059622406959533691406250000000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("1.734723475976807094411924481391906738281250000000000000000000000000000000000000000000000000000000000e-18"),
- mp_float("3.469446951953614188823848962783813476562500000000000000000000000000000000000000000000000000000000000e-18"),
- mp_float("6.938893903907228377647697925567626953125000000000000000000000000000000000000000000000000000000000000e-18"),
- mp_float("1.387778780781445675529539585113525390625000000000000000000000000000000000000000000000000000000000000e-17"),
- mp_float("2.775557561562891351059079170227050781250000000000000000000000000000000000000000000000000000000000000e-17"),
- mp_float("5.551115123125782702118158340454101562500000000000000000000000000000000000000000000000000000000000000e-17"),
- mp_float("1.110223024625156540423631668090820312500000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("2.220446049250313080847263336181640625000000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("4.440892098500626161694526672363281250000000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("8.881784197001252323389053344726562500000000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("1.776356839400250464677810668945312500000000000000000000000000000000000000000000000000000000000000000e-15"),
- mp_float("3.552713678800500929355621337890625000000000000000000000000000000000000000000000000000000000000000000e-15"),
- mp_float("7.105427357601001858711242675781250000000000000000000000000000000000000000000000000000000000000000000e-15"),
- mp_float("1.421085471520200371742248535156250000000000000000000000000000000000000000000000000000000000000000000e-14"),
- mp_float("2.842170943040400743484497070312500000000000000000000000000000000000000000000000000000000000000000000e-14"),
- mp_float("5.684341886080801486968994140625000000000000000000000000000000000000000000000000000000000000000000000e-14"),
- mp_float("1.136868377216160297393798828125000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("2.273736754432320594787597656250000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("4.547473508864641189575195312500000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("9.094947017729282379150390625000000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("1.818989403545856475830078125000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
- mp_float("3.637978807091712951660156250000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
- mp_float("7.275957614183425903320312500000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
- mp_float("1.455191522836685180664062500000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
- mp_float("2.910383045673370361328125000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
- mp_float("5.820766091346740722656250000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
- mp_float("1.164153218269348144531250000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("2.328306436538696289062500000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("4.656612873077392578125000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("9.313225746154785156250000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("1.862645149230957031250000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
- mp_float("3.725290298461914062500000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
- mp_float("7.450580596923828125000000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
- mp_float("1.490116119384765625000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
- mp_float("2.980232238769531250000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
- mp_float("5.960464477539062500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
- mp_float("1.192092895507812500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("2.384185791015625000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("4.768371582031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("9.536743164062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("1.907348632812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
- mp_float("3.814697265625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
- mp_float("7.629394531250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
- mp_float("0.000015258789062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000030517578125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000061035156250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000244140625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000488281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000976562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.001953125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.003906250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.007812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.06250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.125"),
- mp_float("0.25"),
- mp_float("0.5"),
+ cpp_float("5.877471754111437539843682686111228389093327783860437607543758531392086297273635864257812500000000000e-39"),
+ cpp_float("1.175494350822287507968736537222245677818665556772087521508751706278417259454727172851562500000000000e-38"),
+ cpp_float("2.350988701644575015937473074444491355637331113544175043017503412556834518909454345703125000000000000e-38"),
+ cpp_float("4.701977403289150031874946148888982711274662227088350086035006825113669037818908691406250000000000000e-38"),
+ cpp_float("9.403954806578300063749892297777965422549324454176700172070013650227338075637817382812500000000000000e-38"),
+ cpp_float("1.880790961315660012749978459555593084509864890835340034414002730045467615127563476562500000000000000e-37"),
+ cpp_float("3.761581922631320025499956919111186169019729781670680068828005460090935230255126953125000000000000000e-37"),
+ cpp_float("7.523163845262640050999913838222372338039459563341360137656010920181870460510253906250000000000000000e-37"),
+ cpp_float("1.504632769052528010199982767644474467607891912668272027531202184036374092102050781250000000000000000e-36"),
+ cpp_float("3.009265538105056020399965535288948935215783825336544055062404368072748184204101562500000000000000000e-36"),
+ cpp_float("6.018531076210112040799931070577897870431567650673088110124808736145496368408203125000000000000000000e-36"),
+ cpp_float("1.203706215242022408159986214115579574086313530134617622024961747229099273681640625000000000000000000e-35"),
+ cpp_float("2.407412430484044816319972428231159148172627060269235244049923494458198547363281250000000000000000000e-35"),
+ cpp_float("4.814824860968089632639944856462318296345254120538470488099846988916397094726562500000000000000000000e-35"),
+ cpp_float("9.629649721936179265279889712924636592690508241076940976199693977832794189453125000000000000000000000e-35"),
+ cpp_float("1.925929944387235853055977942584927318538101648215388195239938795566558837890625000000000000000000000e-34"),
+ cpp_float("3.851859888774471706111955885169854637076203296430776390479877591133117675781250000000000000000000000e-34"),
+ cpp_float("7.703719777548943412223911770339709274152406592861552780959755182266235351562500000000000000000000000e-34"),
+ cpp_float("1.540743955509788682444782354067941854830481318572310556191951036453247070312500000000000000000000000e-33"),
+ cpp_float("3.081487911019577364889564708135883709660962637144621112383902072906494140625000000000000000000000000e-33"),
+ cpp_float("6.162975822039154729779129416271767419321925274289242224767804145812988281250000000000000000000000000e-33"),
+ cpp_float("1.232595164407830945955825883254353483864385054857848444953560829162597656250000000000000000000000000e-32"),
+ cpp_float("2.465190328815661891911651766508706967728770109715696889907121658325195312500000000000000000000000000e-32"),
+ cpp_float("4.930380657631323783823303533017413935457540219431393779814243316650390625000000000000000000000000000e-32"),
+ cpp_float("9.860761315262647567646607066034827870915080438862787559628486633300781250000000000000000000000000000e-32"),
+ cpp_float("1.972152263052529513529321413206965574183016087772557511925697326660156250000000000000000000000000000e-31"),
+ cpp_float("3.944304526105059027058642826413931148366032175545115023851394653320312500000000000000000000000000000e-31"),
+ cpp_float("7.888609052210118054117285652827862296732064351090230047702789306640625000000000000000000000000000000e-31"),
+ cpp_float("1.577721810442023610823457130565572459346412870218046009540557861328125000000000000000000000000000000e-30"),
+ cpp_float("3.155443620884047221646914261131144918692825740436092019081115722656250000000000000000000000000000000e-30"),
+ cpp_float("6.310887241768094443293828522262289837385651480872184038162231445312500000000000000000000000000000000e-30"),
+ cpp_float("1.262177448353618888658765704452457967477130296174436807632446289062500000000000000000000000000000000e-29"),
+ cpp_float("2.524354896707237777317531408904915934954260592348873615264892578125000000000000000000000000000000000e-29"),
+ cpp_float("5.048709793414475554635062817809831869908521184697747230529785156250000000000000000000000000000000000e-29"),
+ cpp_float("1.009741958682895110927012563561966373981704236939549446105957031250000000000000000000000000000000000e-28"),
+ cpp_float("2.019483917365790221854025127123932747963408473879098892211914062500000000000000000000000000000000000e-28"),
+ cpp_float("4.038967834731580443708050254247865495926816947758197784423828125000000000000000000000000000000000000e-28"),
+ cpp_float("8.077935669463160887416100508495730991853633895516395568847656250000000000000000000000000000000000000e-28"),
+ cpp_float("1.615587133892632177483220101699146198370726779103279113769531250000000000000000000000000000000000000e-27"),
+ cpp_float("3.231174267785264354966440203398292396741453558206558227539062500000000000000000000000000000000000000e-27"),
+ cpp_float("6.462348535570528709932880406796584793482907116413116455078125000000000000000000000000000000000000000e-27"),
+ cpp_float("1.292469707114105741986576081359316958696581423282623291015625000000000000000000000000000000000000000e-26"),
+ cpp_float("2.584939414228211483973152162718633917393162846565246582031250000000000000000000000000000000000000000e-26"),
+ cpp_float("5.169878828456422967946304325437267834786325693130493164062500000000000000000000000000000000000000000e-26"),
+ cpp_float("1.033975765691284593589260865087453566957265138626098632812500000000000000000000000000000000000000000e-25"),
+ cpp_float("2.067951531382569187178521730174907133914530277252197265625000000000000000000000000000000000000000000e-25"),
+ cpp_float("4.135903062765138374357043460349814267829060554504394531250000000000000000000000000000000000000000000e-25"),
+ cpp_float("8.271806125530276748714086920699628535658121109008789062500000000000000000000000000000000000000000000e-25"),
+ cpp_float("1.654361225106055349742817384139925707131624221801757812500000000000000000000000000000000000000000000e-24"),
+ cpp_float("3.308722450212110699485634768279851414263248443603515625000000000000000000000000000000000000000000000e-24"),
+ cpp_float("6.617444900424221398971269536559702828526496887207031250000000000000000000000000000000000000000000000e-24"),
+ cpp_float("1.323488980084844279794253907311940565705299377441406250000000000000000000000000000000000000000000000e-23"),
+ cpp_float("2.646977960169688559588507814623881131410598754882812500000000000000000000000000000000000000000000000e-23"),
+ cpp_float("5.293955920339377119177015629247762262821197509765625000000000000000000000000000000000000000000000000e-23"),
+ cpp_float("1.058791184067875423835403125849552452564239501953125000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("2.117582368135750847670806251699104905128479003906250000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("4.235164736271501695341612503398209810256958007812500000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("8.470329472543003390683225006796419620513916015625000000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("1.694065894508600678136645001359283924102783203125000000000000000000000000000000000000000000000000000e-21"),
+ cpp_float("3.388131789017201356273290002718567848205566406250000000000000000000000000000000000000000000000000000e-21"),
+ cpp_float("6.776263578034402712546580005437135696411132812500000000000000000000000000000000000000000000000000000e-21"),
+ cpp_float("1.355252715606880542509316001087427139282226562500000000000000000000000000000000000000000000000000000e-20"),
+ cpp_float("2.710505431213761085018632002174854278564453125000000000000000000000000000000000000000000000000000000e-20"),
+ cpp_float("5.421010862427522170037264004349708557128906250000000000000000000000000000000000000000000000000000000e-20"),
+ cpp_float("1.084202172485504434007452800869941711425781250000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("2.168404344971008868014905601739883422851562500000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("4.336808689942017736029811203479766845703125000000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("8.673617379884035472059622406959533691406250000000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("1.734723475976807094411924481391906738281250000000000000000000000000000000000000000000000000000000000e-18"),
+ cpp_float("3.469446951953614188823848962783813476562500000000000000000000000000000000000000000000000000000000000e-18"),
+ cpp_float("6.938893903907228377647697925567626953125000000000000000000000000000000000000000000000000000000000000e-18"),
+ cpp_float("1.387778780781445675529539585113525390625000000000000000000000000000000000000000000000000000000000000e-17"),
+ cpp_float("2.775557561562891351059079170227050781250000000000000000000000000000000000000000000000000000000000000e-17"),
+ cpp_float("5.551115123125782702118158340454101562500000000000000000000000000000000000000000000000000000000000000e-17"),
+ cpp_float("1.110223024625156540423631668090820312500000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("2.220446049250313080847263336181640625000000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("4.440892098500626161694526672363281250000000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("8.881784197001252323389053344726562500000000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("1.776356839400250464677810668945312500000000000000000000000000000000000000000000000000000000000000000e-15"),
+ cpp_float("3.552713678800500929355621337890625000000000000000000000000000000000000000000000000000000000000000000e-15"),
+ cpp_float("7.105427357601001858711242675781250000000000000000000000000000000000000000000000000000000000000000000e-15"),
+ cpp_float("1.421085471520200371742248535156250000000000000000000000000000000000000000000000000000000000000000000e-14"),
+ cpp_float("2.842170943040400743484497070312500000000000000000000000000000000000000000000000000000000000000000000e-14"),
+ cpp_float("5.684341886080801486968994140625000000000000000000000000000000000000000000000000000000000000000000000e-14"),
+ cpp_float("1.136868377216160297393798828125000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("2.273736754432320594787597656250000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("4.547473508864641189575195312500000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("9.094947017729282379150390625000000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("1.818989403545856475830078125000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
+ cpp_float("3.637978807091712951660156250000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
+ cpp_float("7.275957614183425903320312500000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
+ cpp_float("1.455191522836685180664062500000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
+ cpp_float("2.910383045673370361328125000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
+ cpp_float("5.820766091346740722656250000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
+ cpp_float("1.164153218269348144531250000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("2.328306436538696289062500000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("4.656612873077392578125000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("9.313225746154785156250000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("1.862645149230957031250000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
+ cpp_float("3.725290298461914062500000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
+ cpp_float("7.450580596923828125000000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
+ cpp_float("1.490116119384765625000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
+ cpp_float("2.980232238769531250000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
+ cpp_float("5.960464477539062500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
+ cpp_float("1.192092895507812500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("2.384185791015625000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("4.768371582031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("9.536743164062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("1.907348632812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
+ cpp_float("3.814697265625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
+ cpp_float("7.629394531250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
+ cpp_float("0.000015258789062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000030517578125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000061035156250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000244140625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000488281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000976562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.001953125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.003906250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.007812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.06250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.125"),
+ cpp_float("0.25"),
+ cpp_float("0.5"),
one(),
two(),
- mp_float(static_cast<unsigned long long>(4)),
- mp_float(static_cast<unsigned long long>(8)),
- mp_float(static_cast<unsigned long long>(16)),
- mp_float(static_cast<unsigned long long>(32)),
- mp_float(static_cast<unsigned long long>(64)),
- mp_float(static_cast<unsigned long long>(128)),
- mp_float(static_cast<unsigned long long>(256)),
- mp_float(static_cast<unsigned long long>(512)),
- mp_float(static_cast<unsigned long long>(1024)),
- mp_float(static_cast<unsigned long long>(2048)),
- mp_float(static_cast<unsigned long long>(4096)),
- mp_float(static_cast<unsigned long long>(8192)),
- mp_float(static_cast<unsigned long long>(16384)),
- mp_float(static_cast<unsigned long long>(32768)),
- mp_float(static_cast<unsigned long long>(65536)),
- mp_float(static_cast<unsigned long long>(131072)),
- mp_float(static_cast<unsigned long long>(262144)),
- mp_float(static_cast<unsigned long long>(524288)),
- mp_float(static_cast<boost::uint64_t>(1uL << 20u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 21u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 22u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 23u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 24u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 25u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 26u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 27u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 28u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 29u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 30u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 31u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 32u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 33u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 34u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 35u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 36u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 37u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 38u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 39u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 40u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 41u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 42u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 43u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 44u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 45u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 46u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 47u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 48u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 49u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 50u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 51u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 52u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 53u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 54u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 55u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 56u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 57u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 58u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 59u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 60u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 61u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 62u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 63u)),
- mp_float("1.844674407370955161600000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
- mp_float("3.689348814741910323200000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
- mp_float("7.378697629483820646400000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
- mp_float("1.475739525896764129280000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
- mp_float("2.951479051793528258560000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
- mp_float("5.902958103587056517120000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
- mp_float("1.180591620717411303424000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("2.361183241434822606848000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("4.722366482869645213696000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("9.444732965739290427392000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("1.888946593147858085478400000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
- mp_float("3.777893186295716170956800000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
- mp_float("7.555786372591432341913600000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
- mp_float("1.511157274518286468382720000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
- mp_float("3.022314549036572936765440000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
- mp_float("6.044629098073145873530880000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
- mp_float("1.208925819614629174706176000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("2.417851639229258349412352000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("4.835703278458516698824704000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("9.671406556917033397649408000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("1.934281311383406679529881600000000000000000000000000000000000000000000000000000000000000000000000000e25"),
- mp_float("3.868562622766813359059763200000000000000000000000000000000000000000000000000000000000000000000000000e25"),
- mp_float("7.737125245533626718119526400000000000000000000000000000000000000000000000000000000000000000000000000e25"),
- mp_float("1.547425049106725343623905280000000000000000000000000000000000000000000000000000000000000000000000000e26"),
- mp_float("3.094850098213450687247810560000000000000000000000000000000000000000000000000000000000000000000000000e26"),
- mp_float("6.189700196426901374495621120000000000000000000000000000000000000000000000000000000000000000000000000e26"),
- mp_float("1.237940039285380274899124224000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("2.475880078570760549798248448000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("4.951760157141521099596496896000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("9.903520314283042199192993792000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("1.980704062856608439838598758400000000000000000000000000000000000000000000000000000000000000000000000e28"),
- mp_float("3.961408125713216879677197516800000000000000000000000000000000000000000000000000000000000000000000000e28"),
- mp_float("7.922816251426433759354395033600000000000000000000000000000000000000000000000000000000000000000000000e28"),
- mp_float("1.584563250285286751870879006720000000000000000000000000000000000000000000000000000000000000000000000e29"),
- mp_float("3.169126500570573503741758013440000000000000000000000000000000000000000000000000000000000000000000000e29"),
- mp_float("6.338253001141147007483516026880000000000000000000000000000000000000000000000000000000000000000000000e29"),
- mp_float("1.267650600228229401496703205376000000000000000000000000000000000000000000000000000000000000000000000e30"),
- mp_float("2.535301200456458802993406410752000000000000000000000000000000000000000000000000000000000000000000000e30"),
- mp_float("5.070602400912917605986812821504000000000000000000000000000000000000000000000000000000000000000000000e30"),
- mp_float("1.014120480182583521197362564300800000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("2.028240960365167042394725128601600000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("4.056481920730334084789450257203200000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("8.112963841460668169578900514406400000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("1.622592768292133633915780102881280000000000000000000000000000000000000000000000000000000000000000000e32"),
- mp_float("3.245185536584267267831560205762560000000000000000000000000000000000000000000000000000000000000000000e32"),
- mp_float("6.490371073168534535663120411525120000000000000000000000000000000000000000000000000000000000000000000e32"),
- mp_float("1.298074214633706907132624082305024000000000000000000000000000000000000000000000000000000000000000000e33"),
- mp_float("2.596148429267413814265248164610048000000000000000000000000000000000000000000000000000000000000000000e33"),
- mp_float("5.192296858534827628530496329220096000000000000000000000000000000000000000000000000000000000000000000e33"),
- mp_float("1.038459371706965525706099265844019200000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("2.076918743413931051412198531688038400000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("4.153837486827862102824397063376076800000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("8.307674973655724205648794126752153600000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("1.661534994731144841129758825350430720000000000000000000000000000000000000000000000000000000000000000e35"),
- mp_float("3.323069989462289682259517650700861440000000000000000000000000000000000000000000000000000000000000000e35"),
- mp_float("6.646139978924579364519035301401722880000000000000000000000000000000000000000000000000000000000000000e35"),
- mp_float("1.329227995784915872903807060280344576000000000000000000000000000000000000000000000000000000000000000e36"),
- mp_float("2.658455991569831745807614120560689152000000000000000000000000000000000000000000000000000000000000000e36"),
- mp_float("5.316911983139663491615228241121378304000000000000000000000000000000000000000000000000000000000000000e36"),
- mp_float("1.063382396627932698323045648224275660800000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("2.126764793255865396646091296448551321600000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("4.253529586511730793292182592897102643200000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("8.507059173023461586584365185794205286400000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("1.701411834604692317316873037158841057280000000000000000000000000000000000000000000000000000000000000e38")
+ cpp_float(static_cast<unsigned long long>(4)),
+ cpp_float(static_cast<unsigned long long>(8)),
+ cpp_float(static_cast<unsigned long long>(16)),
+ cpp_float(static_cast<unsigned long long>(32)),
+ cpp_float(static_cast<unsigned long long>(64)),
+ cpp_float(static_cast<unsigned long long>(128)),
+ cpp_float(static_cast<unsigned long long>(256)),
+ cpp_float(static_cast<unsigned long long>(512)),
+ cpp_float(static_cast<unsigned long long>(1024)),
+ cpp_float(static_cast<unsigned long long>(2048)),
+ cpp_float(static_cast<unsigned long long>(4096)),
+ cpp_float(static_cast<unsigned long long>(8192)),
+ cpp_float(static_cast<unsigned long long>(16384)),
+ cpp_float(static_cast<unsigned long long>(32768)),
+ cpp_float(static_cast<unsigned long long>(65536)),
+ cpp_float(static_cast<unsigned long long>(131072)),
+ cpp_float(static_cast<unsigned long long>(262144)),
+ cpp_float(static_cast<unsigned long long>(524288)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 20u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 21u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 22u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 23u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 24u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 25u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 26u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 27u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 28u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 29u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 30u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 31u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 32u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 33u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 34u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 35u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 36u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 37u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 38u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 39u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 40u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 41u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 42u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 43u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 44u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 45u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 46u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 47u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 48u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 49u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 50u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 51u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 52u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 53u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 54u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 55u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 56u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 57u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 58u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 59u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 60u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 61u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 62u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 63u)),
+ cpp_float("1.844674407370955161600000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
+ cpp_float("3.689348814741910323200000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
+ cpp_float("7.378697629483820646400000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
+ cpp_float("1.475739525896764129280000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
+ cpp_float("2.951479051793528258560000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
+ cpp_float("5.902958103587056517120000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
+ cpp_float("1.180591620717411303424000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("2.361183241434822606848000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("4.722366482869645213696000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("9.444732965739290427392000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("1.888946593147858085478400000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
+ cpp_float("3.777893186295716170956800000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
+ cpp_float("7.555786372591432341913600000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
+ cpp_float("1.511157274518286468382720000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
+ cpp_float("3.022314549036572936765440000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
+ cpp_float("6.044629098073145873530880000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
+ cpp_float("1.208925819614629174706176000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("2.417851639229258349412352000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("4.835703278458516698824704000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("9.671406556917033397649408000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("1.934281311383406679529881600000000000000000000000000000000000000000000000000000000000000000000000000e25"),
+ cpp_float("3.868562622766813359059763200000000000000000000000000000000000000000000000000000000000000000000000000e25"),
+ cpp_float("7.737125245533626718119526400000000000000000000000000000000000000000000000000000000000000000000000000e25"),
+ cpp_float("1.547425049106725343623905280000000000000000000000000000000000000000000000000000000000000000000000000e26"),
+ cpp_float("3.094850098213450687247810560000000000000000000000000000000000000000000000000000000000000000000000000e26"),
+ cpp_float("6.189700196426901374495621120000000000000000000000000000000000000000000000000000000000000000000000000e26"),
+ cpp_float("1.237940039285380274899124224000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("2.475880078570760549798248448000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("4.951760157141521099596496896000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("9.903520314283042199192993792000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("1.980704062856608439838598758400000000000000000000000000000000000000000000000000000000000000000000000e28"),
+ cpp_float("3.961408125713216879677197516800000000000000000000000000000000000000000000000000000000000000000000000e28"),
+ cpp_float("7.922816251426433759354395033600000000000000000000000000000000000000000000000000000000000000000000000e28"),
+ cpp_float("1.584563250285286751870879006720000000000000000000000000000000000000000000000000000000000000000000000e29"),
+ cpp_float("3.169126500570573503741758013440000000000000000000000000000000000000000000000000000000000000000000000e29"),
+ cpp_float("6.338253001141147007483516026880000000000000000000000000000000000000000000000000000000000000000000000e29"),
+ cpp_float("1.267650600228229401496703205376000000000000000000000000000000000000000000000000000000000000000000000e30"),
+ cpp_float("2.535301200456458802993406410752000000000000000000000000000000000000000000000000000000000000000000000e30"),
+ cpp_float("5.070602400912917605986812821504000000000000000000000000000000000000000000000000000000000000000000000e30"),
+ cpp_float("1.014120480182583521197362564300800000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("2.028240960365167042394725128601600000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("4.056481920730334084789450257203200000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("8.112963841460668169578900514406400000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("1.622592768292133633915780102881280000000000000000000000000000000000000000000000000000000000000000000e32"),
+ cpp_float("3.245185536584267267831560205762560000000000000000000000000000000000000000000000000000000000000000000e32"),
+ cpp_float("6.490371073168534535663120411525120000000000000000000000000000000000000000000000000000000000000000000e32"),
+ cpp_float("1.298074214633706907132624082305024000000000000000000000000000000000000000000000000000000000000000000e33"),
+ cpp_float("2.596148429267413814265248164610048000000000000000000000000000000000000000000000000000000000000000000e33"),
+ cpp_float("5.192296858534827628530496329220096000000000000000000000000000000000000000000000000000000000000000000e33"),
+ cpp_float("1.038459371706965525706099265844019200000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("2.076918743413931051412198531688038400000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("4.153837486827862102824397063376076800000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("8.307674973655724205648794126752153600000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("1.661534994731144841129758825350430720000000000000000000000000000000000000000000000000000000000000000e35"),
+ cpp_float("3.323069989462289682259517650700861440000000000000000000000000000000000000000000000000000000000000000e35"),
+ cpp_float("6.646139978924579364519035301401722880000000000000000000000000000000000000000000000000000000000000000e35"),
+ cpp_float("1.329227995784915872903807060280344576000000000000000000000000000000000000000000000000000000000000000e36"),
+ cpp_float("2.658455991569831745807614120560689152000000000000000000000000000000000000000000000000000000000000000e36"),
+ cpp_float("5.316911983139663491615228241121378304000000000000000000000000000000000000000000000000000000000000000e36"),
+ cpp_float("1.063382396627932698323045648224275660800000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("2.126764793255865396646091296448551321600000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("4.253529586511730793292182592897102643200000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("8.507059173023461586584365185794205286400000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("1.701411834604692317316873037158841057280000000000000000000000000000000000000000000000000000000000000e38")
}};
if((p > static_cast<boost::int64_t>(-128)) && (p < static_cast<boost::int64_t>(+128)))
@@ -2414,11 +2414,11 @@
else if(p < static_cast<boost::int64_t>(std::numeric_limits<boost::uint64_t>::digits))
{
const boost::uint64_t p2 = static_cast<boost::uint64_t>(static_cast<boost::uint64_t>(1uLL) << p);
- return mp_float(p2);
+ return cpp_float(p2);
}
else
{
- mp_float<Digits10> t;
+ cpp_float<Digits10> t;
default_ops::detail::pow_imp(t, two(), p, mpl::true_());
return t;
}
@@ -2426,49 +2426,49 @@
template <unsigned Digits10>
-inline void add(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void add(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result += o;
}
template <unsigned Digits10>
-inline void subtract(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void subtract(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result -= o;
}
template <unsigned Digits10>
-inline void multiply(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void multiply(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result *= o;
}
template <unsigned Digits10>
-inline void divide(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void divide(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result /= o;
}
template <unsigned Digits10>
-inline void add(mp_float<Digits10>& result, const unsigned long long& o)
+inline void add(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.add_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void subtract(mp_float<Digits10>& result, const unsigned long long& o)
+inline void subtract(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.sub_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void multiply(mp_float<Digits10>& result, const unsigned long long& o)
+inline void multiply(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.mul_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void divide(mp_float<Digits10>& result, const unsigned long long& o)
+inline void divide(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.div_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void add(mp_float<Digits10>& result, long long o)
+inline void add(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
result.sub_unsigned_long_long(-o);
@@ -2476,7 +2476,7 @@
result.add_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void subtract(mp_float<Digits10>& result, long long o)
+inline void subtract(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
result.add_unsigned_long_long(-o);
@@ -2484,7 +2484,7 @@
result.sub_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void multiply(mp_float<Digits10>& result, long long o)
+inline void multiply(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
{
@@ -2495,7 +2495,7 @@
result.mul_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void divide(mp_float<Digits10>& result, long long o)
+inline void divide(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
{
@@ -2507,17 +2507,17 @@
}
template <unsigned Digits10>
-inline void convert_to(unsigned long long* result, const mp_float<Digits10>& val)
+inline void convert_to(unsigned long long* result, const cpp_float<Digits10>& val)
{
*result = val.extract_unsigned_long_long();
}
template <unsigned Digits10>
-inline void convert_to(long long* result, const mp_float<Digits10>& val)
+inline void convert_to(long long* result, const cpp_float<Digits10>& val)
{
*result = val.extract_signed_long_long();
}
template <unsigned Digits10>
-inline void convert_to(long double* result, mp_float<Digits10>& val)
+inline void convert_to(long double* result, cpp_float<Digits10>& val)
{
*result = val.extract_long_double();
}
@@ -2526,7 +2526,7 @@
// Non member function support:
//
template <unsigned Digits10>
-inline int eval_fpclassify(const mp_float<Digits10>& x)
+inline int eval_fpclassify(const cpp_float<Digits10>& x)
{
if(x.isinf())
return FP_INFINITE;
@@ -2538,7 +2538,7 @@
}
template <unsigned Digits10>
-inline void eval_abs(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_abs(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(x.isneg())
@@ -2546,7 +2546,7 @@
}
template <unsigned Digits10>
-inline void eval_fabs(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_fabs(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(x.isneg())
@@ -2554,14 +2554,14 @@
}
template <unsigned Digits10>
-inline void eval_sqrt(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_sqrt(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
result.calculate_sqrt();
}
template <unsigned Digits10>
-inline void eval_floor(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_floor(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(!x.isfinite() || x.isint())
@@ -2570,12 +2570,12 @@
}
if(x.isneg())
- result -= mp_float<Digits10>::one();
+ result -= cpp_float<Digits10>::one();
result = result.extract_integer_part();
}
template <unsigned Digits10>
-inline void eval_ceil(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_ceil(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(!x.isfinite() || x.isint())
@@ -2584,16 +2584,16 @@
}
if(!x.isneg())
- result += mp_float<Digits10>::one();
+ result += cpp_float<Digits10>::one();
result = result.extract_integer_part();
}
template <unsigned Digits10>
-inline void eval_trunc(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_trunc(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
if(!x.isfinite())
{
- result = boost::math::policies::raise_rounding_error("boost::multiprecision::trunc<%1%>(%1%)", 0, mp_number<mp_float<Digits10> >(x), 0, boost::math::policies::policy<>()).backend();
+ result = boost::math::policies::raise_rounding_error("boost::multiprecision::trunc<%1%>(%1%)", 0, mp_number<cpp_float<Digits10> >(x), 0, boost::math::policies::policy<>()).backend();
return;
}
else if(x.isint())
@@ -2605,14 +2605,14 @@
}
template <unsigned Digits10>
-inline void eval_ldexp(mp_float<Digits10>& result, const mp_float<Digits10>& x, long long e)
+inline void eval_ldexp(cpp_float<Digits10>& result, const cpp_float<Digits10>& x, long long e)
{
result = x;
- result *= mp_float<Digits10>::pow2(e);
+ result *= cpp_float<Digits10>::pow2(e);
}
template <unsigned Digits10>
-inline void eval_frexp(mp_float<Digits10>& result, const mp_float<Digits10>& x, long long* e)
+inline void eval_frexp(cpp_float<Digits10>& result, const cpp_float<Digits10>& x, long long* e)
{
result = x;
if(result.isneg())
@@ -2624,16 +2624,16 @@
throw std::runtime_error("Exponent is too large to be represented as a power of 2.");
t *= 3;
- result *= mp_float<Digits10>::pow2(-t);
+ result *= cpp_float<Digits10>::pow2(-t);
- while(result.compare(mp_float<Digits10>::one()) >= 0)
+ while(result.compare(cpp_float<Digits10>::one()) >= 0)
{
- result /= mp_float<Digits10>::two();
+ result /= cpp_float<Digits10>::two();
++t;
}
- while(result.compare(mp_float<Digits10>::half()) < 0)
+ while(result.compare(cpp_float<Digits10>::half()) < 0)
{
- result *= mp_float<Digits10>::two();
+ result *= cpp_float<Digits10>::two();
--t;
}
*e = t;
@@ -2642,7 +2642,7 @@
}
template <unsigned Digits10>
-inline void eval_frexp(mp_float<Digits10>& result, const mp_float<Digits10>& x, int* e)
+inline void eval_frexp(cpp_float<Digits10>& result, const cpp_float<Digits10>& x, int* e)
{
long long t;
eval_frexp(result, x, &t);
@@ -2651,15 +2651,15 @@
*e = static_cast<int>(t);
}
-typedef mp_number<mp_float<50> > mp_float_50;
-typedef mp_number<mp_float<100> > mp_float_100;
+typedef mp_number<cpp_float<50> > cpp_float_50;
+typedef mp_number<cpp_float<100> > cpp_float_100;
}}
namespace std
{
template <unsigned Digits10>
- class numeric_limits<boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > >
+ class numeric_limits<boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > >
{
public:
static const bool is_specialized = true;
@@ -2670,13 +2670,13 @@
static const bool is_modulo = false;
static const bool is_iec559 = false;
static const int digits = static_cast<int>(((Digits10 + 1) * 1000L) / 301L);
- static const int digits10 = boost::multiprecision::mp_float<Digits10>::mp_float_digits10;
- static const int max_digits10 = boost::multiprecision::mp_float<Digits10>::mp_float_max_digits10;
- static const boost::int64_t min_exponent = boost::multiprecision::mp_float<Digits10>::mp_float_min_exp; // Type differs from int.
- static const boost::int64_t min_exponent10 = boost::multiprecision::mp_float<Digits10>::mp_float_min_exp10; // Type differs from int.
- static const boost::int64_t max_exponent = boost::multiprecision::mp_float<Digits10>::mp_float_max_exp; // Type differs from int.
- static const boost::int64_t max_exponent10 = boost::multiprecision::mp_float<Digits10>::mp_float_max_exp10; // Type differs from int.
- static const int radix = boost::multiprecision::mp_float<Digits10>::mp_radix;
+ static const int digits10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_digits10;
+ static const int max_digits10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_max_digits10;
+ static const boost::int64_t min_exponent = boost::multiprecision::cpp_float<Digits10>::cpp_float_min_exp; // Type differs from int.
+ static const boost::int64_t min_exponent10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_min_exp10; // Type differs from int.
+ static const boost::int64_t max_exponent = boost::multiprecision::cpp_float<Digits10>::cpp_float_max_exp; // Type differs from int.
+ static const boost::int64_t max_exponent10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_max_exp10; // Type differs from int.
+ static const int radix = boost::multiprecision::cpp_float<Digits10>::mp_radix;
static const std::float_round_style round_style = std::round_to_nearest;
static const bool has_infinity = true;
static const bool has_quiet_NaN = true;
@@ -2686,15 +2686,15 @@
static const bool traps = false;
static const bool tinyness_before = false;
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > (min) (void) throw() { return (boost::multiprecision::mp_float<Digits10>::min)(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > (max) (void) throw() { return (boost::multiprecision::mp_float<Digits10>::max)(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > lowest (void) throw() { return boost::multiprecision::mp_float<Digits10>::zero(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > epsilon (void) throw() { return boost::multiprecision::mp_float<Digits10>::eps(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > round_error (void) throw() { return 0.5L; }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > infinity (void) throw() { return boost::multiprecision::mp_float<Digits10>::inf(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > quiet_NaN (void) throw() { return boost::multiprecision::mp_float<Digits10>::nan(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > signaling_NaN(void) throw() { return boost::multiprecision::mp_float<Digits10>::zero(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > denorm_min (void) throw() { return boost::multiprecision::mp_float<Digits10>::zero(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > (min) (void) throw() { return (boost::multiprecision::cpp_float<Digits10>::min)(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > (max) (void) throw() { return (boost::multiprecision::cpp_float<Digits10>::max)(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > lowest (void) throw() { return boost::multiprecision::cpp_float<Digits10>::zero(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > epsilon (void) throw() { return boost::multiprecision::cpp_float<Digits10>::eps(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > round_error (void) throw() { return 0.5L; }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > infinity (void) throw() { return boost::multiprecision::cpp_float<Digits10>::inf(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > quiet_NaN (void) throw() { return boost::multiprecision::cpp_float<Digits10>::nan(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > signaling_NaN(void) throw() { return boost::multiprecision::cpp_float<Digits10>::zero(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > denorm_min (void) throw() { return boost::multiprecision::cpp_float<Digits10>::zero(); }
};
}
@@ -2703,7 +2703,7 @@
namespace policies{
template <unsigned Digits10, class Policy>
-struct precision< boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> >, Policy>
+struct precision< boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> >, Policy>
{
typedef typename Policy::precision_type precision_type;
typedef digits2<((Digits10 + 1) * 1000L) / 301L> digits_2;
Modified: sandbox/big_number/boost/multiprecision/mp_float.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/mp_float.hpp (original)
+++ sandbox/big_number/boost/multiprecision/mp_float.hpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -25,7 +25,7 @@
namespace multiprecision{
template <unsigned Digits10>
-class mp_float
+class cpp_float
{
public:
typedef mpl::list<long long> signed_types;
@@ -35,22 +35,22 @@
static const boost::int32_t mp_radix = 10;
- static const boost::int32_t mp_float_digits = Digits10;
+ static const boost::int32_t cpp_float_digits = Digits10;
- static const boost::int32_t mp_float_digits10_setting = Digits10;
- static const boost::int32_t mp_float_digits10_limit = boost::integer_traits<boost::int32_t>::const_max;
- static const boost::int32_t mp_float_digits10 = ((mp_float_digits10_setting < static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : ((mp_float_digits10_setting > mp_float_digits10_limit) ? mp_float_digits10_limit : mp_float_digits10_setting));
- static const boost::int32_t mp_float_digits10_extra = static_cast<boost::int32_t>(((static_cast<boost::int64_t>(mp_float_digits10) * 15LL) + 50LL) / 100LL);
- static const boost::int32_t mp_float_max_digits10 = static_cast<boost::int32_t>(mp_float_digits10 + ((mp_float_digits10_extra < static_cast<boost::int32_t>(5)) ? static_cast<boost::int32_t>(5) : ((mp_float_digits10_extra > static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : mp_float_digits10_extra)));
- static const boost::int64_t mp_float_max_exp = static_cast<boost::int64_t>(+9223372036854775795LL);
- static const boost::int64_t mp_float_min_exp = static_cast<boost::int64_t>(-9223372036854775795LL);
- static const boost::int64_t mp_float_max_exp10 = static_cast<boost::int64_t>(+3063937869882635616LL); // Approx. [mp_float_max_exp / log10(2)], also an even multiple of 8
- static const boost::int64_t mp_float_min_exp10 = static_cast<boost::int64_t>(-3063937869882635616LL);
+ static const boost::int32_t cpp_float_digits10_setting = Digits10;
+ static const boost::int32_t cpp_float_digits10_limit = boost::integer_traits<boost::int32_t>::const_max;
+ static const boost::int32_t cpp_float_digits10 = ((cpp_float_digits10_setting < static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : ((cpp_float_digits10_setting > cpp_float_digits10_limit) ? cpp_float_digits10_limit : cpp_float_digits10_setting));
+ static const boost::int32_t cpp_float_digits10_extra = static_cast<boost::int32_t>(((static_cast<boost::int64_t>(cpp_float_digits10) * 15LL) + 50LL) / 100LL);
+ static const boost::int32_t cpp_float_max_digits10 = static_cast<boost::int32_t>(cpp_float_digits10 + ((cpp_float_digits10_extra < static_cast<boost::int32_t>(5)) ? static_cast<boost::int32_t>(5) : ((cpp_float_digits10_extra > static_cast<boost::int32_t>(30)) ? static_cast<boost::int32_t>(30) : cpp_float_digits10_extra)));
+ static const boost::int64_t cpp_float_max_exp = static_cast<boost::int64_t>(+9223372036854775795LL);
+ static const boost::int64_t cpp_float_min_exp = static_cast<boost::int64_t>(-9223372036854775795LL);
+ static const boost::int64_t cpp_float_max_exp10 = static_cast<boost::int64_t>(+3063937869882635616LL); // Approx. [cpp_float_max_exp / log10(2)], also an even multiple of 8
+ static const boost::int64_t cpp_float_min_exp10 = static_cast<boost::int64_t>(-3063937869882635616LL);
static const boost::int32_t mp_elem_digits10 = static_cast<boost::int32_t>(8);
private:
- static const boost::int32_t mp_float_digits10_num_base = static_cast<boost::int32_t>((mp_float_max_digits10 / mp_elem_digits10) + (((mp_float_max_digits10 % mp_elem_digits10) != 0) ? 1 : 0));
- static const boost::int32_t mp_elem_number = static_cast<boost::int32_t>(mp_float_digits10_num_base + 2);
+ static const boost::int32_t cpp_float_digits10_num_base = static_cast<boost::int32_t>((cpp_float_max_digits10 / mp_elem_digits10) + (((cpp_float_max_digits10 % mp_elem_digits10) != 0) ? 1 : 0));
+ static const boost::int32_t mp_elem_number = static_cast<boost::int32_t>(cpp_float_digits10_num_base + 2);
static const boost::int32_t mp_elem_mask = static_cast<boost::int32_t>(100000000);
typedef enum enum_fpclass
@@ -72,7 +72,7 @@
//
// Special values constructor:
//
- mp_float(t_fpclass c) :
+ cpp_float(t_fpclass c) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -86,23 +86,23 @@
{
initializer()
{
- mp_float<Digits10>::nan();
- mp_float<Digits10>::inf();
- (mp_float<Digits10>::min)();
- (mp_float<Digits10>::max)();
- mp_float<Digits10>::zero();
- mp_float<Digits10>::one();
- mp_float<Digits10>::two();
- mp_float<Digits10>::half();
- mp_float<Digits10>::double_min();
- mp_float<Digits10>::double_max();
- mp_float<Digits10>::long_double_max();
- mp_float<Digits10>::long_double_min();
- mp_float<Digits10>::long_long_max();
- mp_float<Digits10>::long_long_min();
- mp_float<Digits10>::ulong_long_max();
- mp_float<Digits10>::eps();
- mp_float<Digits10>::pow2(0);
+ cpp_float<Digits10>::nan();
+ cpp_float<Digits10>::inf();
+ (cpp_float<Digits10>::min)();
+ (cpp_float<Digits10>::max)();
+ cpp_float<Digits10>::zero();
+ cpp_float<Digits10>::one();
+ cpp_float<Digits10>::two();
+ cpp_float<Digits10>::half();
+ cpp_float<Digits10>::double_min();
+ cpp_float<Digits10>::double_max();
+ cpp_float<Digits10>::long_double_max();
+ cpp_float<Digits10>::long_double_min();
+ cpp_float<Digits10>::long_long_max();
+ cpp_float<Digits10>::long_long_min();
+ cpp_float<Digits10>::ulong_long_max();
+ cpp_float<Digits10>::eps();
+ cpp_float<Digits10>::pow2(0);
}
void do_nothing(){}
};
@@ -111,14 +111,14 @@
public:
// Constructors
- mp_float() :
+ cpp_float() :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
fpclass (mp_finite),
prec_elem(mp_elem_number) { }
- mp_float(const char* s) :
+ cpp_float(const char* s) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -129,7 +129,7 @@
}
template<class I>
- mp_float(I i, typename enable_if<is_unsigned<I> >::type* = 0) :
+ cpp_float(I i, typename enable_if<is_unsigned<I> >::type* = 0) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -140,7 +140,7 @@
}
template <class I>
- mp_float(I i, typename enable_if<is_signed<I> >::type* = 0) :
+ cpp_float(I i, typename enable_if<is_signed<I> >::type* = 0) :
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -156,7 +156,7 @@
from_unsigned_long_long(i);
}
- mp_float(const mp_float& f) :
+ cpp_float(const cpp_float& f) :
data (f.data),
exp (f.exp),
neg (f.neg),
@@ -164,7 +164,7 @@
prec_elem(f.prec_elem) { }
template <class F>
- mp_float(const F val, typename enable_if<is_floating_point<F> >::type* = 0):
+ cpp_float(const F val, typename enable_if<is_floating_point<F> >::type* = 0):
data(),
exp (static_cast<boost::int64_t>(0)),
neg (false),
@@ -174,28 +174,28 @@
*this = val;
}
- mp_float(const double val, long long exponent);
+ cpp_float(const double val, long long exponent);
// Specific special values.
- static const mp_float& nan()
+ static const cpp_float& nan()
{
- static const mp_float val(mp_NaN);
+ static const cpp_float val(mp_NaN);
init.do_nothing();
return val;
}
- static const mp_float& inf()
+ static const cpp_float& inf()
{
- static const mp_float val(mp_inf);
+ static const cpp_float val(mp_inf);
init.do_nothing();
return val;
}
- static const mp_float& (max)()
+ static const cpp_float& (max)()
{
init.do_nothing();
static bool init = false;
- static const std::string str_max = std::string("9." + std::string(static_cast<std::size_t>(mp_float_max_digits10), static_cast<char>('9')))
- + std::string("e+" + boost::lexical_cast<std::string>(mp_float_max_exp10));
- static mp_float val_max;
+ static const std::string str_max = std::string("9." + std::string(static_cast<std::size_t>(cpp_float_max_digits10), static_cast<char>('9')))
+ + std::string("e+" + boost::lexical_cast<std::string>(cpp_float_max_exp10));
+ static cpp_float val_max;
if(!init)
{
init = true;
@@ -204,93 +204,93 @@
return val_max;
}
- static const mp_float& (min)()
+ static const cpp_float& (min)()
{
init.do_nothing();
static bool init = false;
- static mp_float val_min;
+ static cpp_float val_min;
if(!init)
{
init = true;
- val_min = std::string("1.0e" + boost::lexical_cast<std::string>(mp_float_min_exp10)).c_str();
+ val_min = std::string("1.0e" + boost::lexical_cast<std::string>(cpp_float_min_exp10)).c_str();
}
return val_min;
}
- static const mp_float& zero()
+ static const cpp_float& zero()
{
init.do_nothing();
- static mp_float val(static_cast<unsigned long long>(0u));
+ static cpp_float val(static_cast<unsigned long long>(0u));
return val;
}
- static const mp_float& one()
+ static const cpp_float& one()
{
init.do_nothing();
- static mp_float val(static_cast<unsigned long long>(1u));
+ static cpp_float val(static_cast<unsigned long long>(1u));
return val;
}
- static const mp_float& two()
+ static const cpp_float& two()
{
init.do_nothing();
- static mp_float val(static_cast<unsigned long long>(2u));
+ static cpp_float val(static_cast<unsigned long long>(2u));
return val;
}
- static const mp_float& half()
+ static const cpp_float& half()
{
init.do_nothing();
- static mp_float val(0.5L);
+ static cpp_float val(0.5L);
return val;
}
- static const mp_float& double_min()
+ static const cpp_float& double_min()
{
init.do_nothing();
- static mp_float val(static_cast<long double>((std::numeric_limits<double>::min)()));
+ static cpp_float val(static_cast<long double>((std::numeric_limits<double>::min)()));
return val;
}
- static const mp_float& double_max()
+ static const cpp_float& double_max()
{
init.do_nothing();
- static mp_float val(static_cast<long double>((std::numeric_limits<double>::max)()));
+ static cpp_float val(static_cast<long double>((std::numeric_limits<double>::max)()));
return val;
}
- static const mp_float& long_double_min()
+ static const cpp_float& long_double_min()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long double>::min)());
+ static cpp_float val((std::numeric_limits<long double>::min)());
return val;
}
- static const mp_float& long_double_max()
+ static const cpp_float& long_double_max()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long double>::max)());
+ static cpp_float val((std::numeric_limits<long double>::max)());
return val;
}
- static const mp_float& long_long_max()
+ static const cpp_float& long_long_max()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long long>::max)());
+ static cpp_float val((std::numeric_limits<long long>::max)());
return val;
}
- static const mp_float& long_long_min()
+ static const cpp_float& long_long_min()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<long long>::min)());
+ static cpp_float val((std::numeric_limits<long long>::min)());
return val;
}
- static const mp_float& ulong_long_max()
+ static const cpp_float& ulong_long_max()
{
init.do_nothing();
- static mp_float val((std::numeric_limits<unsigned long long>::max)());
+ static cpp_float val((std::numeric_limits<unsigned long long>::max)());
return val;
}
- static const mp_float& eps()
+ static const cpp_float& eps()
{
init.do_nothing();
- static mp_float val(1.0, 1 - (int)Digits10);
+ static cpp_float val(1.0, 1 - (int)Digits10);
return val;
}
// Basic operations.
- mp_float& operator= (const mp_float& v)
+ cpp_float& operator= (const cpp_float& v)
{
data = v.data;
exp = v.exp;
@@ -299,7 +299,7 @@
prec_elem = v.prec_elem;
return *this;
}
- mp_float& operator= (long long v)
+ cpp_float& operator= (long long v)
{
if(v < 0)
{
@@ -310,41 +310,41 @@
from_unsigned_long_long(v);
return *this;
}
- mp_float& operator= (unsigned long long v)
+ cpp_float& operator= (unsigned long long v)
{
from_unsigned_long_long(v);
return *this;
}
- mp_float& operator= (long double v);
- mp_float& operator= (const char* v)
+ cpp_float& operator= (long double v);
+ cpp_float& operator= (const char* v)
{
rd_string(v);
return *this;
}
- mp_float& operator+=(const mp_float& v);
- mp_float& operator-=(const mp_float& v);
- mp_float& operator*=(const mp_float& v);
- mp_float& operator/=(const mp_float& v);
+ cpp_float& operator+=(const cpp_float& v);
+ cpp_float& operator-=(const cpp_float& v);
+ cpp_float& operator*=(const cpp_float& v);
+ cpp_float& operator/=(const cpp_float& v);
- mp_float& add_unsigned_long_long(const unsigned long long n)
+ cpp_float& add_unsigned_long_long(const unsigned long long n)
{
- mp_float t;
+ cpp_float t;
t.from_unsigned_long_long(n);
return *this += t;
}
- mp_float& sub_unsigned_long_long(const unsigned long long n)
+ cpp_float& sub_unsigned_long_long(const unsigned long long n)
{
- mp_float t;
+ cpp_float t;
t.from_unsigned_long_long(n);
return *this -= t;
}
- mp_float& mul_unsigned_long_long(const unsigned long long n);
- mp_float& div_unsigned_long_long(const unsigned long long n);
+ cpp_float& mul_unsigned_long_long(const unsigned long long n);
+ cpp_float& div_unsigned_long_long(const unsigned long long n);
// Elementary primitives.
- mp_float& calculate_inv (void);
- mp_float& calculate_sqrt(void);
+ cpp_float& calculate_inv (void);
+ cpp_float& calculate_sqrt(void);
void negate()
{
if(!iszero())
@@ -365,27 +365,27 @@
bool isneg (void) const { return neg; }
// Operators pre-increment and pre-decrement
- mp_float& operator++(void)
+ cpp_float& operator++(void)
{
return *this += one();
}
- mp_float& operator--(void)
+ cpp_float& operator--(void)
{
return *this -= one();
}
std::string str(unsigned digits, bool scientific)const;
- int compare(const mp_float& v)const;
+ int compare(const cpp_float& v)const;
template <class V>
int compare(const V& v)const
{
- mp_float<Digits10> t;
+ cpp_float<Digits10> t;
t = v;
return compare(t);
}
- void swap(mp_float& v)
+ void swap(cpp_float& v)
{
data.swap(v.data);
std::swap(exp, v.exp);
@@ -399,10 +399,10 @@
signed long long extract_signed_long_long (void) const;
unsigned long long extract_unsigned_long_long(void) const;
void extract_parts (double& mantissa, boost::int64_t& exponent) const;
- mp_float extract_integer_part (void) const;
+ cpp_float extract_integer_part (void) const;
void precision(const boost::int32_t prec_digits)
{
- if(prec_digits >= mp_float_digits10)
+ if(prec_digits >= cpp_float_digits10)
{
prec_elem = mp_elem_number;
}
@@ -414,7 +414,7 @@
prec_elem = (std::min)(mp_elem_number, (std::max)(elems, static_cast<boost::int32_t>(2)));
}
}
- static mp_float pow2(long long i);
+ static cpp_float pow2(long long i);
long long order()const
{
const bool bo_order_is_zero = ((!isfinite()) || (data[0] == static_cast<boost::uint32_t>(0u)));
@@ -469,7 +469,7 @@
private:
static bool data_elem_is_non_zero_predicate(const boost::uint32_t& d) { return (d != static_cast<boost::uint32_t>(0u)); }
- static bool data_elem_is_non_nine_predicate(const boost::uint32_t& d) { return (d != static_cast<boost::uint32_t>(mp_float::mp_elem_mask - 1)); }
+ static bool data_elem_is_non_nine_predicate(const boost::uint32_t& d) { return (d != static_cast<boost::uint32_t>(cpp_float::mp_elem_mask - 1)); }
static bool char_is_nonzero_predicate(const char& c) { return (c != static_cast<char>('0')); }
void from_unsigned_long_long(const unsigned long long u);
@@ -484,42 +484,42 @@
};
template <unsigned Digits10>
-typename mp_float<Digits10>::initializer mp_float<Digits10>::init;
+typename cpp_float<Digits10>::initializer cpp_float<Digits10>::init;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_radix;
+const boost::int32_t cpp_float<Digits10>::mp_radix;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_setting;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_setting;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_limit;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_limit;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_extra;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_extra;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_max_digits10;
+const boost::int32_t cpp_float<Digits10>::cpp_float_max_digits10;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_max_exp;
+const boost::int64_t cpp_float<Digits10>::cpp_float_max_exp;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_min_exp;
+const boost::int64_t cpp_float<Digits10>::cpp_float_min_exp;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_max_exp10;
+const boost::int64_t cpp_float<Digits10>::cpp_float_max_exp10;
template <unsigned Digits10>
-const boost::int64_t mp_float<Digits10>::mp_float_min_exp10;
+const boost::int64_t cpp_float<Digits10>::cpp_float_min_exp10;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_elem_digits10;
+const boost::int32_t cpp_float<Digits10>::mp_elem_digits10;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_float_digits10_num_base;
+const boost::int32_t cpp_float<Digits10>::cpp_float_digits10_num_base;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_elem_number;
+const boost::int32_t cpp_float<Digits10>::mp_elem_number;
template <unsigned Digits10>
-const boost::int32_t mp_float<Digits10>::mp_elem_mask;
+const boost::int32_t cpp_float<Digits10>::mp_elem_mask;
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator+=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator+=(const cpp_float<Digits10>& v)
{
if(isnan())
{
@@ -709,13 +709,13 @@
return *this = zero();
}
- bool overflow = exp >= mp_float_max_exp;
- if(exp == mp_float_max_exp)
+ bool overflow = exp >= cpp_float_max_exp;
+ if(exp == cpp_float_max_exp)
{
// Check to see if we really truely have an overflow or not...
if(isneg())
{
- mp_float t(*this);
+ cpp_float t(*this);
t.negate();
overflow = t.compare((max)()) > 0;
}
@@ -739,7 +739,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator-=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator-=(const cpp_float<Digits10>& v)
{
// Use *this - v = -(-*this + v).
negate();
@@ -749,7 +749,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator*=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator*=(const cpp_float<Digits10>& v)
{
// Evaluate the sign of the result.
const bool b_result_is_neg = (neg != v.neg);
@@ -796,7 +796,7 @@
const boost::int64_t v_exp = ((!v_exp_is_neg) ? v.exp : static_cast<boost::int64_t>(-v.exp));
// Check the range of the upcoming multiplication.
- const bool b_result_is_out_of_range = (v_exp >= static_cast<boost::int64_t>(mp_float_max_exp10 - u_exp));
+ const bool b_result_is_out_of_range = (v_exp >= static_cast<boost::int64_t>(cpp_float_max_exp10 - u_exp));
if(b_result_is_out_of_range)
{
@@ -841,7 +841,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator/=(const mp_float<Digits10>& v)
+cpp_float<Digits10>& cpp_float<Digits10>::operator/=(const cpp_float<Digits10>& v)
{
const bool u_and_v_are_finite_and_identical = ( isfinite()
&& (fpclass == v.fpclass)
@@ -865,14 +865,14 @@
}
return *this;
}
- mp_float t(v);
+ cpp_float t(v);
t.calculate_inv();
return operator*=(t);
}
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::mul_unsigned_long_long(const unsigned long long n)
+cpp_float<Digits10>& cpp_float<Digits10>::mul_unsigned_long_long(const unsigned long long n)
{
// Multiply *this with a constant unsigned long long.
@@ -908,7 +908,7 @@
if(n >= static_cast<unsigned long long>(mp_elem_mask))
{
neg = b_neg;
- mp_float t;
+ cpp_float t;
t = n;
return operator*=(t);
}
@@ -936,13 +936,13 @@
data.front() = static_cast<boost::uint32_t>(carry);
}
- bool overflow = exp >= mp_float_max_exp;
- if(exp == mp_float_max_exp)
+ bool overflow = exp >= cpp_float_max_exp;
+ if(exp == cpp_float_max_exp)
{
// Check to see if we really truely have an overflow or not...
if(isneg())
{
- mp_float t(*this);
+ cpp_float t(*this);
t.negate();
overflow = t.compare((max)()) > 0;
}
@@ -967,7 +967,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::div_unsigned_long_long(const unsigned long long n)
+cpp_float<Digits10>& cpp_float<Digits10>::div_unsigned_long_long(const unsigned long long n)
{
// Divide *this by a constant unsigned long long.
@@ -1016,7 +1016,7 @@
if(n >= static_cast<unsigned long long>(mp_elem_mask))
{
neg = b_neg;
- mp_float t;
+ cpp_float t;
t = n;
return operator/=(t);
}
@@ -1056,7 +1056,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::calculate_inv()
+cpp_float<Digits10>& cpp_float<Digits10>::calculate_inv()
{
// Compute the inverse of *this.
const bool b_neg = neg;
@@ -1090,7 +1090,7 @@
}
// Save the original *this.
- mp_float<Digits10> x(*this);
+ cpp_float<Digits10> x(*this);
// Generate the initial estimate using division.
// Extract the mantissa and exponent for a "manual"
@@ -1100,7 +1100,7 @@
x.extract_parts(dd, ne);
// Do the inverse estimate using double precision estimates of mantissa and exponent.
- operator=(mp_float<Digits10>(1.0 / dd, -ne));
+ operator=(cpp_float<Digits10>(1.0 / dd, -ne));
// Compute the inverse of *this. Quadratically convergent Newton-Raphson iteration
// is used. During the iterative steps, the precision of the calculation is limited
@@ -1115,7 +1115,7 @@
x.precision(static_cast<boost::int32_t>(digits * static_cast<boost::int32_t>(2)));
// Next iteration.
- mp_float t(*this);
+ cpp_float t(*this);
t *= x;
t -= two();
t.negate();
@@ -1130,7 +1130,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::calculate_sqrt(void)
+cpp_float<Digits10>& cpp_float<Digits10>::calculate_sqrt(void)
{
// Compute the square root of *this.
@@ -1146,7 +1146,7 @@
}
// Save the original *this.
- mp_float<Digits10> x(*this);
+ cpp_float<Digits10> x(*this);
// Generate the initial estimate using division.
// Extract the mantissa and exponent for a "manual"
@@ -1166,10 +1166,10 @@
// Estimate the square root using simple manipulations.
const double sqd = std::sqrt(dd);
- *this = mp_float<Digits10>(sqd, static_cast<boost::int64_t>(ne / static_cast<boost::int64_t>(2)));
+ *this = cpp_float<Digits10>(sqd, static_cast<boost::int64_t>(ne / static_cast<boost::int64_t>(2)));
// Estimate 1.0 / (2.0 * x0) using simple manipulations.
- mp_float<Digits10> vi(0.5 / sqd, static_cast<boost::int64_t>(-ne / static_cast<boost::int64_t>(2)));
+ cpp_float<Digits10> vi(0.5 / sqd, static_cast<boost::int64_t>(-ne / static_cast<boost::int64_t>(2)));
// Compute the square root of x. Coupled Newton iteration
// as described in "Pi Unleashed" is used. During the
@@ -1190,7 +1190,7 @@
vi.precision(digits * 2);
// Next iteration of vi
- mp_float t(*this);
+ cpp_float t(*this);
t *= vi;
t.negate();
t.mul_unsigned_long_long(2u);
@@ -1213,7 +1213,7 @@
}
template <unsigned Digits10>
-int mp_float<Digits10>::cmp_data(const array_type& vd) const
+int cpp_float<Digits10>::cmp_data(const array_type& vd) const
{
// Compare the data of *this with those of v.
// Return +1 for *this > v
@@ -1235,7 +1235,7 @@
}
template <unsigned Digits10>
-int mp_float<Digits10>::compare(const mp_float& v) const
+int cpp_float<Digits10>::compare(const cpp_float& v) const
{
// Compare v with *this.
// Return +1 for *this > v
@@ -1313,7 +1313,7 @@
}
template <unsigned Digits10>
-bool mp_float<Digits10>::isone() const
+bool cpp_float<Digits10>::isone() const
{
// Check if the value of *this is identically 1 or very close to 1.
@@ -1337,7 +1337,7 @@
}
template <unsigned Digits10>
-bool mp_float<Digits10>::isint() const
+bool cpp_float<Digits10>::isint() const
{
if(fpclass != mp_finite) { return false; }
@@ -1360,9 +1360,9 @@
}
template <unsigned Digits10>
-void mp_float<Digits10>::extract_parts(double& mantissa, boost::int64_t& exponent) const
+void cpp_float<Digits10>::extract_parts(double& mantissa, boost::int64_t& exponent) const
{
- // Extract the approximate parts mantissa and base-10 exponent from the input mp_float<Digits10> value x.
+ // Extract the approximate parts mantissa and base-10 exponent from the input cpp_float<Digits10> value x.
// Extracts the mantissa and exponent.
exponent = exp;
@@ -1393,11 +1393,11 @@
}
template <unsigned Digits10>
-double mp_float<Digits10>::extract_double(void) const
+double cpp_float<Digits10>::extract_double(void) const
{
- // Returns the double conversion of a mp_float<Digits10>.
+ // Returns the double conversion of a cpp_float<Digits10>.
- // Check for non-normal mp_float<Digits10>.
+ // Check for non-normal cpp_float<Digits10>.
if(!isfinite())
{
if(isnan())
@@ -1411,17 +1411,17 @@
}
}
- mp_float<Digits10> xx(*this);
+ cpp_float<Digits10> xx(*this);
if(xx.isneg())
xx.negate();
- // Check for zero mp_float<Digits10>.
+ // Check for zero cpp_float<Digits10>.
if(iszero() || (xx.compare(double_min()) < 0))
{
return 0.0;
}
- // Check if mp_float<Digits10> exceeds the maximum of double.
+ // Check if cpp_float<Digits10> exceeds the maximum of double.
if(xx.compare(double_max()) > 0)
{
return ((!neg) ? std::numeric_limits<double>::infinity()
@@ -1439,11 +1439,11 @@
}
template <unsigned Digits10>
-long double mp_float<Digits10>::extract_long_double(void) const
+long double cpp_float<Digits10>::extract_long_double(void) const
{
- // Returns the long double conversion of a mp_float<Digits10>.
+ // Returns the long double conversion of a cpp_float<Digits10>.
- // Check for non-normal mp_float<Digits10>.
+ // Check for non-normal cpp_float<Digits10>.
if(!isfinite())
{
if(isnan())
@@ -1457,17 +1457,17 @@
}
}
- mp_float<Digits10> xx(*this);
+ cpp_float<Digits10> xx(*this);
if(xx.isneg())
xx.negate();
- // Check for zero mp_float<Digits10>.
+ // Check for zero cpp_float<Digits10>.
if(iszero() || (xx.compare(long_double_min()) < 0))
{
return static_cast<long double>(0.0);
}
- // Check if mp_float<Digits10> exceeds the maximum of double.
+ // Check if cpp_float<Digits10> exceeds the maximum of double.
if(xx.compare(long_double_max()) > 0)
{
return ((!neg) ? std::numeric_limits<long double>::infinity()
@@ -1485,7 +1485,7 @@
}
template <unsigned Digits10>
-signed long long mp_float<Digits10>::extract_signed_long_long(void) const
+signed long long cpp_float<Digits10>::extract_signed_long_long(void) const
{
// Extracts a signed long long from *this.
// If (x > maximum of signed long long) or (x < minimum of signed long long),
@@ -1511,7 +1511,7 @@
else
{
// Extract the data into an unsigned long long value.
- mp_float<Digits10> xn(extract_integer_part());
+ cpp_float<Digits10> xn(extract_integer_part());
if(xn.isneg())
xn.negate();
@@ -1530,7 +1530,7 @@
}
template <unsigned Digits10>
-unsigned long long mp_float<Digits10>::extract_unsigned_long_long(void) const
+unsigned long long cpp_float<Digits10>::extract_unsigned_long_long(void) const
{
// Extracts an unsigned long long from *this.
// If x exceeds the maximum of unsigned long long,
@@ -1548,7 +1548,7 @@
return static_cast<unsigned long long>(0u);
}
- const mp_float<Digits10> xn(extract_integer_part());
+ const cpp_float<Digits10> xn(extract_integer_part());
unsigned long long val;
@@ -1574,7 +1574,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10> mp_float<Digits10>::extract_integer_part(void) const
+cpp_float<Digits10> cpp_float<Digits10>::extract_integer_part(void) const
{
// Compute the signed integer part of x.
@@ -1597,7 +1597,7 @@
}
// Make a local copy.
- mp_float<Digits10> x = *this;
+ cpp_float<Digits10> x = *this;
// Clear out the decimal portion
const size_t first_clear = (static_cast<size_t>(x.exp) / static_cast<size_t>(mp_elem_digits10)) + 1u;
@@ -1609,20 +1609,20 @@
}
template <unsigned Digits10>
-std::string mp_float<Digits10>::str(std::size_t number_of_digits, bool scientific) const
+std::string cpp_float<Digits10>::str(std::size_t number_of_digits, bool scientific) const
{
std::string str;
boost::int64_t my_exp = order();
if(number_of_digits == 0)
number_of_digits = (std::numeric_limits<std::size_t>::max)();
- // Determine the number of elements needed to provide the requested digits from mp_float<Digits10>.
+ // Determine the number of elements needed to provide the requested digits from cpp_float<Digits10>.
const std::size_t number_of_elements = (std::min)(static_cast<std::size_t>((number_of_digits / static_cast<std::size_t>(mp_elem_digits10)) + 2u),
static_cast<std::size_t>(mp_elem_number));
- // Extract the remaining digits from mp_float<Digits10> after the decimal point.
+ // Extract the remaining digits from cpp_float<Digits10> after the decimal point.
str = boost::lexical_cast<std::string>(data[0]);
- // Extract all of the digits from mp_float<Digits10>, beginning with the first data element.
+ // Extract all of the digits from cpp_float<Digits10>, beginning with the first data element.
for(std::size_t i = static_cast<std::size_t>(1u); i < number_of_elements; i++)
{
std::stringstream ss;
@@ -1714,7 +1714,7 @@
}
template <unsigned Digits10>
-bool mp_float<Digits10>::rd_string(const char* const s)
+bool cpp_float<Digits10>::rd_string(const char* const s)
{
std::string str(s);
@@ -1764,7 +1764,7 @@
}
}
- // Put the input string into the standard mp_float<Digits10> input form
+ // Put the input string into the standard cpp_float<Digits10> input form
// aaa.bbbbE+/-n, where aa has 1...mp_elem_digits10, bbbb has an
// even multiple of mp_elem_digits10 which are possibly zero padded
// on the right-end, and n is a signed 32-bit integer which is an
@@ -1892,7 +1892,7 @@
static_cast<std::size_t>(pos_plus_one + max_dec));
}
- // Now the input string has the standard mp_float<Digits10> input form.
+ // Now the input string has the standard cpp_float<Digits10> input form.
// (See the comment above.)
// Set all the data elements to 0.
@@ -1916,7 +1916,7 @@
}
// Check for overflow...
- if(exp > mp_float_max_exp10)
+ if(exp > cpp_float_max_exp10)
{
const bool b_result_is_neg = neg;
@@ -1926,12 +1926,12 @@
}
// ...and check for underflow.
- if(exp <= mp_float_min_exp10)
+ if(exp <= cpp_float_min_exp10)
{
- if(exp == mp_float_min_exp10)
+ if(exp == cpp_float_min_exp10)
{
// Check for identity with the minimum value.
- mp_float<Digits10> test = *this;
+ cpp_float<Digits10> test = *this;
test.exp = static_cast<boost::int64_t>(0);
@@ -1950,14 +1950,14 @@
}
template <unsigned Digits10>
-mp_float<Digits10>::mp_float(const double mantissa, const boost::int64_t exponent)
+cpp_float<Digits10>::cpp_float(const double mantissa, const boost::int64_t exponent)
: data (),
exp (static_cast<boost::int64_t>(0)),
neg (false),
fpclass (mp_finite),
prec_elem(mp_elem_number)
{
- // Create an mp_float<Digits10> from mantissa and exponent.
+ // Create an cpp_float<Digits10> from mantissa and exponent.
// This ctor does not maintain the full precision of double.
const bool mantissa_is_iszero = (::fabs(mantissa) < ((std::numeric_limits<double>::min)() * (1.0 + std::numeric_limits<double>::epsilon())));
@@ -2002,7 +2002,7 @@
}
template <unsigned Digits10>
-mp_float<Digits10>& mp_float<Digits10>::operator = (long double a)
+cpp_float<Digits10>& cpp_float<Digits10>::operator = (long double a)
{
// Christopher Kormanyos's original code used a cast to long long here, but that fails
// when long double has more digits than a long long.
@@ -2052,7 +2052,7 @@
}
template <unsigned Digits10>
-void mp_float<Digits10>::from_unsigned_long_long(const unsigned long long u)
+void cpp_float<Digits10>::from_unsigned_long_long(const unsigned long long u)
{
std::fill(data.begin(), data.end(), static_cast<boost::uint32_t>(0u));
@@ -2084,7 +2084,7 @@
}
template <unsigned Digits10>
-void mp_float<Digits10>::mul_loop_uv(const boost::uint32_t* const u, const boost::uint32_t* const v, boost::uint32_t* const w, const boost::int32_t p)
+void cpp_float<Digits10>::mul_loop_uv(const boost::uint32_t* const u, const boost::uint32_t* const v, boost::uint32_t* const w, const boost::int32_t p)
{
boost::uint64_t carry = static_cast<boost::uint64_t>(0u);
@@ -2105,7 +2105,7 @@
}
template <unsigned Digits10>
-boost::uint32_t mp_float<Digits10>::mul_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
+boost::uint32_t cpp_float<Digits10>::mul_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
{
boost::uint64_t carry = static_cast<boost::uint64_t>(0u);
@@ -2121,7 +2121,7 @@
}
template <unsigned Digits10>
-boost::uint32_t mp_float<Digits10>::div_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
+boost::uint32_t cpp_float<Digits10>::div_loop_n(boost::uint32_t* const u, boost::uint32_t n, const boost::int32_t p)
{
boost::uint64_t prev = static_cast<boost::uint64_t>(0u);
@@ -2136,269 +2136,269 @@
}
template <unsigned Digits10>
-mp_float<Digits10> mp_float<Digits10>::pow2(const boost::int64_t p)
+cpp_float<Digits10> cpp_float<Digits10>::pow2(const boost::int64_t p)
{
// Create a static const table of p^2 for -128 < p < +128.
// Note: The size of this table must be odd-numbered and
// symmetric about 0.
init.do_nothing();
- static const boost::array<mp_float<Digits10>, 255u> p2_data =
+ static const boost::array<cpp_float<Digits10>, 255u> p2_data =
{{
- mp_float("5.877471754111437539843682686111228389093327783860437607543758531392086297273635864257812500000000000e-39"),
- mp_float("1.175494350822287507968736537222245677818665556772087521508751706278417259454727172851562500000000000e-38"),
- mp_float("2.350988701644575015937473074444491355637331113544175043017503412556834518909454345703125000000000000e-38"),
- mp_float("4.701977403289150031874946148888982711274662227088350086035006825113669037818908691406250000000000000e-38"),
- mp_float("9.403954806578300063749892297777965422549324454176700172070013650227338075637817382812500000000000000e-38"),
- mp_float("1.880790961315660012749978459555593084509864890835340034414002730045467615127563476562500000000000000e-37"),
- mp_float("3.761581922631320025499956919111186169019729781670680068828005460090935230255126953125000000000000000e-37"),
- mp_float("7.523163845262640050999913838222372338039459563341360137656010920181870460510253906250000000000000000e-37"),
- mp_float("1.504632769052528010199982767644474467607891912668272027531202184036374092102050781250000000000000000e-36"),
- mp_float("3.009265538105056020399965535288948935215783825336544055062404368072748184204101562500000000000000000e-36"),
- mp_float("6.018531076210112040799931070577897870431567650673088110124808736145496368408203125000000000000000000e-36"),
- mp_float("1.203706215242022408159986214115579574086313530134617622024961747229099273681640625000000000000000000e-35"),
- mp_float("2.407412430484044816319972428231159148172627060269235244049923494458198547363281250000000000000000000e-35"),
- mp_float("4.814824860968089632639944856462318296345254120538470488099846988916397094726562500000000000000000000e-35"),
- mp_float("9.629649721936179265279889712924636592690508241076940976199693977832794189453125000000000000000000000e-35"),
- mp_float("1.925929944387235853055977942584927318538101648215388195239938795566558837890625000000000000000000000e-34"),
- mp_float("3.851859888774471706111955885169854637076203296430776390479877591133117675781250000000000000000000000e-34"),
- mp_float("7.703719777548943412223911770339709274152406592861552780959755182266235351562500000000000000000000000e-34"),
- mp_float("1.540743955509788682444782354067941854830481318572310556191951036453247070312500000000000000000000000e-33"),
- mp_float("3.081487911019577364889564708135883709660962637144621112383902072906494140625000000000000000000000000e-33"),
- mp_float("6.162975822039154729779129416271767419321925274289242224767804145812988281250000000000000000000000000e-33"),
- mp_float("1.232595164407830945955825883254353483864385054857848444953560829162597656250000000000000000000000000e-32"),
- mp_float("2.465190328815661891911651766508706967728770109715696889907121658325195312500000000000000000000000000e-32"),
- mp_float("4.930380657631323783823303533017413935457540219431393779814243316650390625000000000000000000000000000e-32"),
- mp_float("9.860761315262647567646607066034827870915080438862787559628486633300781250000000000000000000000000000e-32"),
- mp_float("1.972152263052529513529321413206965574183016087772557511925697326660156250000000000000000000000000000e-31"),
- mp_float("3.944304526105059027058642826413931148366032175545115023851394653320312500000000000000000000000000000e-31"),
- mp_float("7.888609052210118054117285652827862296732064351090230047702789306640625000000000000000000000000000000e-31"),
- mp_float("1.577721810442023610823457130565572459346412870218046009540557861328125000000000000000000000000000000e-30"),
- mp_float("3.155443620884047221646914261131144918692825740436092019081115722656250000000000000000000000000000000e-30"),
- mp_float("6.310887241768094443293828522262289837385651480872184038162231445312500000000000000000000000000000000e-30"),
- mp_float("1.262177448353618888658765704452457967477130296174436807632446289062500000000000000000000000000000000e-29"),
- mp_float("2.524354896707237777317531408904915934954260592348873615264892578125000000000000000000000000000000000e-29"),
- mp_float("5.048709793414475554635062817809831869908521184697747230529785156250000000000000000000000000000000000e-29"),
- mp_float("1.009741958682895110927012563561966373981704236939549446105957031250000000000000000000000000000000000e-28"),
- mp_float("2.019483917365790221854025127123932747963408473879098892211914062500000000000000000000000000000000000e-28"),
- mp_float("4.038967834731580443708050254247865495926816947758197784423828125000000000000000000000000000000000000e-28"),
- mp_float("8.077935669463160887416100508495730991853633895516395568847656250000000000000000000000000000000000000e-28"),
- mp_float("1.615587133892632177483220101699146198370726779103279113769531250000000000000000000000000000000000000e-27"),
- mp_float("3.231174267785264354966440203398292396741453558206558227539062500000000000000000000000000000000000000e-27"),
- mp_float("6.462348535570528709932880406796584793482907116413116455078125000000000000000000000000000000000000000e-27"),
- mp_float("1.292469707114105741986576081359316958696581423282623291015625000000000000000000000000000000000000000e-26"),
- mp_float("2.584939414228211483973152162718633917393162846565246582031250000000000000000000000000000000000000000e-26"),
- mp_float("5.169878828456422967946304325437267834786325693130493164062500000000000000000000000000000000000000000e-26"),
- mp_float("1.033975765691284593589260865087453566957265138626098632812500000000000000000000000000000000000000000e-25"),
- mp_float("2.067951531382569187178521730174907133914530277252197265625000000000000000000000000000000000000000000e-25"),
- mp_float("4.135903062765138374357043460349814267829060554504394531250000000000000000000000000000000000000000000e-25"),
- mp_float("8.271806125530276748714086920699628535658121109008789062500000000000000000000000000000000000000000000e-25"),
- mp_float("1.654361225106055349742817384139925707131624221801757812500000000000000000000000000000000000000000000e-24"),
- mp_float("3.308722450212110699485634768279851414263248443603515625000000000000000000000000000000000000000000000e-24"),
- mp_float("6.617444900424221398971269536559702828526496887207031250000000000000000000000000000000000000000000000e-24"),
- mp_float("1.323488980084844279794253907311940565705299377441406250000000000000000000000000000000000000000000000e-23"),
- mp_float("2.646977960169688559588507814623881131410598754882812500000000000000000000000000000000000000000000000e-23"),
- mp_float("5.293955920339377119177015629247762262821197509765625000000000000000000000000000000000000000000000000e-23"),
- mp_float("1.058791184067875423835403125849552452564239501953125000000000000000000000000000000000000000000000000e-22"),
- mp_float("2.117582368135750847670806251699104905128479003906250000000000000000000000000000000000000000000000000e-22"),
- mp_float("4.235164736271501695341612503398209810256958007812500000000000000000000000000000000000000000000000000e-22"),
- mp_float("8.470329472543003390683225006796419620513916015625000000000000000000000000000000000000000000000000000e-22"),
- mp_float("1.694065894508600678136645001359283924102783203125000000000000000000000000000000000000000000000000000e-21"),
- mp_float("3.388131789017201356273290002718567848205566406250000000000000000000000000000000000000000000000000000e-21"),
- mp_float("6.776263578034402712546580005437135696411132812500000000000000000000000000000000000000000000000000000e-21"),
- mp_float("1.355252715606880542509316001087427139282226562500000000000000000000000000000000000000000000000000000e-20"),
- mp_float("2.710505431213761085018632002174854278564453125000000000000000000000000000000000000000000000000000000e-20"),
- mp_float("5.421010862427522170037264004349708557128906250000000000000000000000000000000000000000000000000000000e-20"),
- mp_float("1.084202172485504434007452800869941711425781250000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("2.168404344971008868014905601739883422851562500000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("4.336808689942017736029811203479766845703125000000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("8.673617379884035472059622406959533691406250000000000000000000000000000000000000000000000000000000000e-19"),
- mp_float("1.734723475976807094411924481391906738281250000000000000000000000000000000000000000000000000000000000e-18"),
- mp_float("3.469446951953614188823848962783813476562500000000000000000000000000000000000000000000000000000000000e-18"),
- mp_float("6.938893903907228377647697925567626953125000000000000000000000000000000000000000000000000000000000000e-18"),
- mp_float("1.387778780781445675529539585113525390625000000000000000000000000000000000000000000000000000000000000e-17"),
- mp_float("2.775557561562891351059079170227050781250000000000000000000000000000000000000000000000000000000000000e-17"),
- mp_float("5.551115123125782702118158340454101562500000000000000000000000000000000000000000000000000000000000000e-17"),
- mp_float("1.110223024625156540423631668090820312500000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("2.220446049250313080847263336181640625000000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("4.440892098500626161694526672363281250000000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("8.881784197001252323389053344726562500000000000000000000000000000000000000000000000000000000000000000e-16"),
- mp_float("1.776356839400250464677810668945312500000000000000000000000000000000000000000000000000000000000000000e-15"),
- mp_float("3.552713678800500929355621337890625000000000000000000000000000000000000000000000000000000000000000000e-15"),
- mp_float("7.105427357601001858711242675781250000000000000000000000000000000000000000000000000000000000000000000e-15"),
- mp_float("1.421085471520200371742248535156250000000000000000000000000000000000000000000000000000000000000000000e-14"),
- mp_float("2.842170943040400743484497070312500000000000000000000000000000000000000000000000000000000000000000000e-14"),
- mp_float("5.684341886080801486968994140625000000000000000000000000000000000000000000000000000000000000000000000e-14"),
- mp_float("1.136868377216160297393798828125000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("2.273736754432320594787597656250000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("4.547473508864641189575195312500000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("9.094947017729282379150390625000000000000000000000000000000000000000000000000000000000000000000000000e-13"),
- mp_float("1.818989403545856475830078125000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
- mp_float("3.637978807091712951660156250000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
- mp_float("7.275957614183425903320312500000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
- mp_float("1.455191522836685180664062500000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
- mp_float("2.910383045673370361328125000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
- mp_float("5.820766091346740722656250000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
- mp_float("1.164153218269348144531250000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("2.328306436538696289062500000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("4.656612873077392578125000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("9.313225746154785156250000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
- mp_float("1.862645149230957031250000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
- mp_float("3.725290298461914062500000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
- mp_float("7.450580596923828125000000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
- mp_float("1.490116119384765625000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
- mp_float("2.980232238769531250000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
- mp_float("5.960464477539062500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
- mp_float("1.192092895507812500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("2.384185791015625000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("4.768371582031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("9.536743164062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
- mp_float("1.907348632812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
- mp_float("3.814697265625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
- mp_float("7.629394531250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
- mp_float("0.000015258789062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000030517578125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000061035156250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000244140625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000488281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.000976562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.001953125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.003906250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.007812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.06250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
- mp_float("0.125"),
- mp_float("0.25"),
- mp_float("0.5"),
+ cpp_float("5.877471754111437539843682686111228389093327783860437607543758531392086297273635864257812500000000000e-39"),
+ cpp_float("1.175494350822287507968736537222245677818665556772087521508751706278417259454727172851562500000000000e-38"),
+ cpp_float("2.350988701644575015937473074444491355637331113544175043017503412556834518909454345703125000000000000e-38"),
+ cpp_float("4.701977403289150031874946148888982711274662227088350086035006825113669037818908691406250000000000000e-38"),
+ cpp_float("9.403954806578300063749892297777965422549324454176700172070013650227338075637817382812500000000000000e-38"),
+ cpp_float("1.880790961315660012749978459555593084509864890835340034414002730045467615127563476562500000000000000e-37"),
+ cpp_float("3.761581922631320025499956919111186169019729781670680068828005460090935230255126953125000000000000000e-37"),
+ cpp_float("7.523163845262640050999913838222372338039459563341360137656010920181870460510253906250000000000000000e-37"),
+ cpp_float("1.504632769052528010199982767644474467607891912668272027531202184036374092102050781250000000000000000e-36"),
+ cpp_float("3.009265538105056020399965535288948935215783825336544055062404368072748184204101562500000000000000000e-36"),
+ cpp_float("6.018531076210112040799931070577897870431567650673088110124808736145496368408203125000000000000000000e-36"),
+ cpp_float("1.203706215242022408159986214115579574086313530134617622024961747229099273681640625000000000000000000e-35"),
+ cpp_float("2.407412430484044816319972428231159148172627060269235244049923494458198547363281250000000000000000000e-35"),
+ cpp_float("4.814824860968089632639944856462318296345254120538470488099846988916397094726562500000000000000000000e-35"),
+ cpp_float("9.629649721936179265279889712924636592690508241076940976199693977832794189453125000000000000000000000e-35"),
+ cpp_float("1.925929944387235853055977942584927318538101648215388195239938795566558837890625000000000000000000000e-34"),
+ cpp_float("3.851859888774471706111955885169854637076203296430776390479877591133117675781250000000000000000000000e-34"),
+ cpp_float("7.703719777548943412223911770339709274152406592861552780959755182266235351562500000000000000000000000e-34"),
+ cpp_float("1.540743955509788682444782354067941854830481318572310556191951036453247070312500000000000000000000000e-33"),
+ cpp_float("3.081487911019577364889564708135883709660962637144621112383902072906494140625000000000000000000000000e-33"),
+ cpp_float("6.162975822039154729779129416271767419321925274289242224767804145812988281250000000000000000000000000e-33"),
+ cpp_float("1.232595164407830945955825883254353483864385054857848444953560829162597656250000000000000000000000000e-32"),
+ cpp_float("2.465190328815661891911651766508706967728770109715696889907121658325195312500000000000000000000000000e-32"),
+ cpp_float("4.930380657631323783823303533017413935457540219431393779814243316650390625000000000000000000000000000e-32"),
+ cpp_float("9.860761315262647567646607066034827870915080438862787559628486633300781250000000000000000000000000000e-32"),
+ cpp_float("1.972152263052529513529321413206965574183016087772557511925697326660156250000000000000000000000000000e-31"),
+ cpp_float("3.944304526105059027058642826413931148366032175545115023851394653320312500000000000000000000000000000e-31"),
+ cpp_float("7.888609052210118054117285652827862296732064351090230047702789306640625000000000000000000000000000000e-31"),
+ cpp_float("1.577721810442023610823457130565572459346412870218046009540557861328125000000000000000000000000000000e-30"),
+ cpp_float("3.155443620884047221646914261131144918692825740436092019081115722656250000000000000000000000000000000e-30"),
+ cpp_float("6.310887241768094443293828522262289837385651480872184038162231445312500000000000000000000000000000000e-30"),
+ cpp_float("1.262177448353618888658765704452457967477130296174436807632446289062500000000000000000000000000000000e-29"),
+ cpp_float("2.524354896707237777317531408904915934954260592348873615264892578125000000000000000000000000000000000e-29"),
+ cpp_float("5.048709793414475554635062817809831869908521184697747230529785156250000000000000000000000000000000000e-29"),
+ cpp_float("1.009741958682895110927012563561966373981704236939549446105957031250000000000000000000000000000000000e-28"),
+ cpp_float("2.019483917365790221854025127123932747963408473879098892211914062500000000000000000000000000000000000e-28"),
+ cpp_float("4.038967834731580443708050254247865495926816947758197784423828125000000000000000000000000000000000000e-28"),
+ cpp_float("8.077935669463160887416100508495730991853633895516395568847656250000000000000000000000000000000000000e-28"),
+ cpp_float("1.615587133892632177483220101699146198370726779103279113769531250000000000000000000000000000000000000e-27"),
+ cpp_float("3.231174267785264354966440203398292396741453558206558227539062500000000000000000000000000000000000000e-27"),
+ cpp_float("6.462348535570528709932880406796584793482907116413116455078125000000000000000000000000000000000000000e-27"),
+ cpp_float("1.292469707114105741986576081359316958696581423282623291015625000000000000000000000000000000000000000e-26"),
+ cpp_float("2.584939414228211483973152162718633917393162846565246582031250000000000000000000000000000000000000000e-26"),
+ cpp_float("5.169878828456422967946304325437267834786325693130493164062500000000000000000000000000000000000000000e-26"),
+ cpp_float("1.033975765691284593589260865087453566957265138626098632812500000000000000000000000000000000000000000e-25"),
+ cpp_float("2.067951531382569187178521730174907133914530277252197265625000000000000000000000000000000000000000000e-25"),
+ cpp_float("4.135903062765138374357043460349814267829060554504394531250000000000000000000000000000000000000000000e-25"),
+ cpp_float("8.271806125530276748714086920699628535658121109008789062500000000000000000000000000000000000000000000e-25"),
+ cpp_float("1.654361225106055349742817384139925707131624221801757812500000000000000000000000000000000000000000000e-24"),
+ cpp_float("3.308722450212110699485634768279851414263248443603515625000000000000000000000000000000000000000000000e-24"),
+ cpp_float("6.617444900424221398971269536559702828526496887207031250000000000000000000000000000000000000000000000e-24"),
+ cpp_float("1.323488980084844279794253907311940565705299377441406250000000000000000000000000000000000000000000000e-23"),
+ cpp_float("2.646977960169688559588507814623881131410598754882812500000000000000000000000000000000000000000000000e-23"),
+ cpp_float("5.293955920339377119177015629247762262821197509765625000000000000000000000000000000000000000000000000e-23"),
+ cpp_float("1.058791184067875423835403125849552452564239501953125000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("2.117582368135750847670806251699104905128479003906250000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("4.235164736271501695341612503398209810256958007812500000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("8.470329472543003390683225006796419620513916015625000000000000000000000000000000000000000000000000000e-22"),
+ cpp_float("1.694065894508600678136645001359283924102783203125000000000000000000000000000000000000000000000000000e-21"),
+ cpp_float("3.388131789017201356273290002718567848205566406250000000000000000000000000000000000000000000000000000e-21"),
+ cpp_float("6.776263578034402712546580005437135696411132812500000000000000000000000000000000000000000000000000000e-21"),
+ cpp_float("1.355252715606880542509316001087427139282226562500000000000000000000000000000000000000000000000000000e-20"),
+ cpp_float("2.710505431213761085018632002174854278564453125000000000000000000000000000000000000000000000000000000e-20"),
+ cpp_float("5.421010862427522170037264004349708557128906250000000000000000000000000000000000000000000000000000000e-20"),
+ cpp_float("1.084202172485504434007452800869941711425781250000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("2.168404344971008868014905601739883422851562500000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("4.336808689942017736029811203479766845703125000000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("8.673617379884035472059622406959533691406250000000000000000000000000000000000000000000000000000000000e-19"),
+ cpp_float("1.734723475976807094411924481391906738281250000000000000000000000000000000000000000000000000000000000e-18"),
+ cpp_float("3.469446951953614188823848962783813476562500000000000000000000000000000000000000000000000000000000000e-18"),
+ cpp_float("6.938893903907228377647697925567626953125000000000000000000000000000000000000000000000000000000000000e-18"),
+ cpp_float("1.387778780781445675529539585113525390625000000000000000000000000000000000000000000000000000000000000e-17"),
+ cpp_float("2.775557561562891351059079170227050781250000000000000000000000000000000000000000000000000000000000000e-17"),
+ cpp_float("5.551115123125782702118158340454101562500000000000000000000000000000000000000000000000000000000000000e-17"),
+ cpp_float("1.110223024625156540423631668090820312500000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("2.220446049250313080847263336181640625000000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("4.440892098500626161694526672363281250000000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("8.881784197001252323389053344726562500000000000000000000000000000000000000000000000000000000000000000e-16"),
+ cpp_float("1.776356839400250464677810668945312500000000000000000000000000000000000000000000000000000000000000000e-15"),
+ cpp_float("3.552713678800500929355621337890625000000000000000000000000000000000000000000000000000000000000000000e-15"),
+ cpp_float("7.105427357601001858711242675781250000000000000000000000000000000000000000000000000000000000000000000e-15"),
+ cpp_float("1.421085471520200371742248535156250000000000000000000000000000000000000000000000000000000000000000000e-14"),
+ cpp_float("2.842170943040400743484497070312500000000000000000000000000000000000000000000000000000000000000000000e-14"),
+ cpp_float("5.684341886080801486968994140625000000000000000000000000000000000000000000000000000000000000000000000e-14"),
+ cpp_float("1.136868377216160297393798828125000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("2.273736754432320594787597656250000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("4.547473508864641189575195312500000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("9.094947017729282379150390625000000000000000000000000000000000000000000000000000000000000000000000000e-13"),
+ cpp_float("1.818989403545856475830078125000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
+ cpp_float("3.637978807091712951660156250000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
+ cpp_float("7.275957614183425903320312500000000000000000000000000000000000000000000000000000000000000000000000000e-12"),
+ cpp_float("1.455191522836685180664062500000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
+ cpp_float("2.910383045673370361328125000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
+ cpp_float("5.820766091346740722656250000000000000000000000000000000000000000000000000000000000000000000000000000e-11"),
+ cpp_float("1.164153218269348144531250000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("2.328306436538696289062500000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("4.656612873077392578125000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("9.313225746154785156250000000000000000000000000000000000000000000000000000000000000000000000000000000e-10"),
+ cpp_float("1.862645149230957031250000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
+ cpp_float("3.725290298461914062500000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
+ cpp_float("7.450580596923828125000000000000000000000000000000000000000000000000000000000000000000000000000000000e-9"),
+ cpp_float("1.490116119384765625000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
+ cpp_float("2.980232238769531250000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
+ cpp_float("5.960464477539062500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-8"),
+ cpp_float("1.192092895507812500000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("2.384185791015625000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("4.768371582031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("9.536743164062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-7"),
+ cpp_float("1.907348632812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
+ cpp_float("3.814697265625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
+ cpp_float("7.629394531250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-6"),
+ cpp_float("0.000015258789062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000030517578125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000061035156250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000122070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000244140625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000488281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.000976562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.001953125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.003906250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.007812500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.01562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.03125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.06250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
+ cpp_float("0.125"),
+ cpp_float("0.25"),
+ cpp_float("0.5"),
one(),
two(),
- mp_float(static_cast<unsigned long long>(4)),
- mp_float(static_cast<unsigned long long>(8)),
- mp_float(static_cast<unsigned long long>(16)),
- mp_float(static_cast<unsigned long long>(32)),
- mp_float(static_cast<unsigned long long>(64)),
- mp_float(static_cast<unsigned long long>(128)),
- mp_float(static_cast<unsigned long long>(256)),
- mp_float(static_cast<unsigned long long>(512)),
- mp_float(static_cast<unsigned long long>(1024)),
- mp_float(static_cast<unsigned long long>(2048)),
- mp_float(static_cast<unsigned long long>(4096)),
- mp_float(static_cast<unsigned long long>(8192)),
- mp_float(static_cast<unsigned long long>(16384)),
- mp_float(static_cast<unsigned long long>(32768)),
- mp_float(static_cast<unsigned long long>(65536)),
- mp_float(static_cast<unsigned long long>(131072)),
- mp_float(static_cast<unsigned long long>(262144)),
- mp_float(static_cast<unsigned long long>(524288)),
- mp_float(static_cast<boost::uint64_t>(1uL << 20u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 21u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 22u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 23u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 24u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 25u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 26u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 27u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 28u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 29u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 30u)),
- mp_float(static_cast<boost::uint64_t>(1uL << 31u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 32u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 33u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 34u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 35u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 36u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 37u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 38u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 39u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 40u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 41u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 42u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 43u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 44u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 45u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 46u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 47u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 48u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 49u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 50u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 51u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 52u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 53u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 54u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 55u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 56u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 57u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 58u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 59u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 60u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 61u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 62u)),
- mp_float(static_cast<boost::uint64_t>(1uLL << 63u)),
- mp_float("1.844674407370955161600000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
- mp_float("3.689348814741910323200000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
- mp_float("7.378697629483820646400000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
- mp_float("1.475739525896764129280000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
- mp_float("2.951479051793528258560000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
- mp_float("5.902958103587056517120000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
- mp_float("1.180591620717411303424000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("2.361183241434822606848000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("4.722366482869645213696000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("9.444732965739290427392000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
- mp_float("1.888946593147858085478400000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
- mp_float("3.777893186295716170956800000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
- mp_float("7.555786372591432341913600000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
- mp_float("1.511157274518286468382720000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
- mp_float("3.022314549036572936765440000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
- mp_float("6.044629098073145873530880000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
- mp_float("1.208925819614629174706176000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("2.417851639229258349412352000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("4.835703278458516698824704000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("9.671406556917033397649408000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
- mp_float("1.934281311383406679529881600000000000000000000000000000000000000000000000000000000000000000000000000e25"),
- mp_float("3.868562622766813359059763200000000000000000000000000000000000000000000000000000000000000000000000000e25"),
- mp_float("7.737125245533626718119526400000000000000000000000000000000000000000000000000000000000000000000000000e25"),
- mp_float("1.547425049106725343623905280000000000000000000000000000000000000000000000000000000000000000000000000e26"),
- mp_float("3.094850098213450687247810560000000000000000000000000000000000000000000000000000000000000000000000000e26"),
- mp_float("6.189700196426901374495621120000000000000000000000000000000000000000000000000000000000000000000000000e26"),
- mp_float("1.237940039285380274899124224000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("2.475880078570760549798248448000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("4.951760157141521099596496896000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("9.903520314283042199192993792000000000000000000000000000000000000000000000000000000000000000000000000e27"),
- mp_float("1.980704062856608439838598758400000000000000000000000000000000000000000000000000000000000000000000000e28"),
- mp_float("3.961408125713216879677197516800000000000000000000000000000000000000000000000000000000000000000000000e28"),
- mp_float("7.922816251426433759354395033600000000000000000000000000000000000000000000000000000000000000000000000e28"),
- mp_float("1.584563250285286751870879006720000000000000000000000000000000000000000000000000000000000000000000000e29"),
- mp_float("3.169126500570573503741758013440000000000000000000000000000000000000000000000000000000000000000000000e29"),
- mp_float("6.338253001141147007483516026880000000000000000000000000000000000000000000000000000000000000000000000e29"),
- mp_float("1.267650600228229401496703205376000000000000000000000000000000000000000000000000000000000000000000000e30"),
- mp_float("2.535301200456458802993406410752000000000000000000000000000000000000000000000000000000000000000000000e30"),
- mp_float("5.070602400912917605986812821504000000000000000000000000000000000000000000000000000000000000000000000e30"),
- mp_float("1.014120480182583521197362564300800000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("2.028240960365167042394725128601600000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("4.056481920730334084789450257203200000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("8.112963841460668169578900514406400000000000000000000000000000000000000000000000000000000000000000000e31"),
- mp_float("1.622592768292133633915780102881280000000000000000000000000000000000000000000000000000000000000000000e32"),
- mp_float("3.245185536584267267831560205762560000000000000000000000000000000000000000000000000000000000000000000e32"),
- mp_float("6.490371073168534535663120411525120000000000000000000000000000000000000000000000000000000000000000000e32"),
- mp_float("1.298074214633706907132624082305024000000000000000000000000000000000000000000000000000000000000000000e33"),
- mp_float("2.596148429267413814265248164610048000000000000000000000000000000000000000000000000000000000000000000e33"),
- mp_float("5.192296858534827628530496329220096000000000000000000000000000000000000000000000000000000000000000000e33"),
- mp_float("1.038459371706965525706099265844019200000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("2.076918743413931051412198531688038400000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("4.153837486827862102824397063376076800000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("8.307674973655724205648794126752153600000000000000000000000000000000000000000000000000000000000000000e34"),
- mp_float("1.661534994731144841129758825350430720000000000000000000000000000000000000000000000000000000000000000e35"),
- mp_float("3.323069989462289682259517650700861440000000000000000000000000000000000000000000000000000000000000000e35"),
- mp_float("6.646139978924579364519035301401722880000000000000000000000000000000000000000000000000000000000000000e35"),
- mp_float("1.329227995784915872903807060280344576000000000000000000000000000000000000000000000000000000000000000e36"),
- mp_float("2.658455991569831745807614120560689152000000000000000000000000000000000000000000000000000000000000000e36"),
- mp_float("5.316911983139663491615228241121378304000000000000000000000000000000000000000000000000000000000000000e36"),
- mp_float("1.063382396627932698323045648224275660800000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("2.126764793255865396646091296448551321600000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("4.253529586511730793292182592897102643200000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("8.507059173023461586584365185794205286400000000000000000000000000000000000000000000000000000000000000e37"),
- mp_float("1.701411834604692317316873037158841057280000000000000000000000000000000000000000000000000000000000000e38")
+ cpp_float(static_cast<unsigned long long>(4)),
+ cpp_float(static_cast<unsigned long long>(8)),
+ cpp_float(static_cast<unsigned long long>(16)),
+ cpp_float(static_cast<unsigned long long>(32)),
+ cpp_float(static_cast<unsigned long long>(64)),
+ cpp_float(static_cast<unsigned long long>(128)),
+ cpp_float(static_cast<unsigned long long>(256)),
+ cpp_float(static_cast<unsigned long long>(512)),
+ cpp_float(static_cast<unsigned long long>(1024)),
+ cpp_float(static_cast<unsigned long long>(2048)),
+ cpp_float(static_cast<unsigned long long>(4096)),
+ cpp_float(static_cast<unsigned long long>(8192)),
+ cpp_float(static_cast<unsigned long long>(16384)),
+ cpp_float(static_cast<unsigned long long>(32768)),
+ cpp_float(static_cast<unsigned long long>(65536)),
+ cpp_float(static_cast<unsigned long long>(131072)),
+ cpp_float(static_cast<unsigned long long>(262144)),
+ cpp_float(static_cast<unsigned long long>(524288)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 20u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 21u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 22u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 23u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 24u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 25u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 26u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 27u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 28u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 29u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 30u)),
+ cpp_float(static_cast<boost::uint64_t>(1uL << 31u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 32u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 33u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 34u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 35u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 36u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 37u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 38u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 39u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 40u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 41u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 42u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 43u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 44u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 45u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 46u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 47u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 48u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 49u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 50u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 51u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 52u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 53u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 54u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 55u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 56u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 57u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 58u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 59u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 60u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 61u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 62u)),
+ cpp_float(static_cast<boost::uint64_t>(1uLL << 63u)),
+ cpp_float("1.844674407370955161600000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
+ cpp_float("3.689348814741910323200000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
+ cpp_float("7.378697629483820646400000000000000000000000000000000000000000000000000000000000000000000000000000000e19"),
+ cpp_float("1.475739525896764129280000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
+ cpp_float("2.951479051793528258560000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
+ cpp_float("5.902958103587056517120000000000000000000000000000000000000000000000000000000000000000000000000000000e20"),
+ cpp_float("1.180591620717411303424000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("2.361183241434822606848000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("4.722366482869645213696000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("9.444732965739290427392000000000000000000000000000000000000000000000000000000000000000000000000000000e21"),
+ cpp_float("1.888946593147858085478400000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
+ cpp_float("3.777893186295716170956800000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
+ cpp_float("7.555786372591432341913600000000000000000000000000000000000000000000000000000000000000000000000000000e22"),
+ cpp_float("1.511157274518286468382720000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
+ cpp_float("3.022314549036572936765440000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
+ cpp_float("6.044629098073145873530880000000000000000000000000000000000000000000000000000000000000000000000000000e23"),
+ cpp_float("1.208925819614629174706176000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("2.417851639229258349412352000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("4.835703278458516698824704000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("9.671406556917033397649408000000000000000000000000000000000000000000000000000000000000000000000000000e24"),
+ cpp_float("1.934281311383406679529881600000000000000000000000000000000000000000000000000000000000000000000000000e25"),
+ cpp_float("3.868562622766813359059763200000000000000000000000000000000000000000000000000000000000000000000000000e25"),
+ cpp_float("7.737125245533626718119526400000000000000000000000000000000000000000000000000000000000000000000000000e25"),
+ cpp_float("1.547425049106725343623905280000000000000000000000000000000000000000000000000000000000000000000000000e26"),
+ cpp_float("3.094850098213450687247810560000000000000000000000000000000000000000000000000000000000000000000000000e26"),
+ cpp_float("6.189700196426901374495621120000000000000000000000000000000000000000000000000000000000000000000000000e26"),
+ cpp_float("1.237940039285380274899124224000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("2.475880078570760549798248448000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("4.951760157141521099596496896000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("9.903520314283042199192993792000000000000000000000000000000000000000000000000000000000000000000000000e27"),
+ cpp_float("1.980704062856608439838598758400000000000000000000000000000000000000000000000000000000000000000000000e28"),
+ cpp_float("3.961408125713216879677197516800000000000000000000000000000000000000000000000000000000000000000000000e28"),
+ cpp_float("7.922816251426433759354395033600000000000000000000000000000000000000000000000000000000000000000000000e28"),
+ cpp_float("1.584563250285286751870879006720000000000000000000000000000000000000000000000000000000000000000000000e29"),
+ cpp_float("3.169126500570573503741758013440000000000000000000000000000000000000000000000000000000000000000000000e29"),
+ cpp_float("6.338253001141147007483516026880000000000000000000000000000000000000000000000000000000000000000000000e29"),
+ cpp_float("1.267650600228229401496703205376000000000000000000000000000000000000000000000000000000000000000000000e30"),
+ cpp_float("2.535301200456458802993406410752000000000000000000000000000000000000000000000000000000000000000000000e30"),
+ cpp_float("5.070602400912917605986812821504000000000000000000000000000000000000000000000000000000000000000000000e30"),
+ cpp_float("1.014120480182583521197362564300800000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("2.028240960365167042394725128601600000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("4.056481920730334084789450257203200000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("8.112963841460668169578900514406400000000000000000000000000000000000000000000000000000000000000000000e31"),
+ cpp_float("1.622592768292133633915780102881280000000000000000000000000000000000000000000000000000000000000000000e32"),
+ cpp_float("3.245185536584267267831560205762560000000000000000000000000000000000000000000000000000000000000000000e32"),
+ cpp_float("6.490371073168534535663120411525120000000000000000000000000000000000000000000000000000000000000000000e32"),
+ cpp_float("1.298074214633706907132624082305024000000000000000000000000000000000000000000000000000000000000000000e33"),
+ cpp_float("2.596148429267413814265248164610048000000000000000000000000000000000000000000000000000000000000000000e33"),
+ cpp_float("5.192296858534827628530496329220096000000000000000000000000000000000000000000000000000000000000000000e33"),
+ cpp_float("1.038459371706965525706099265844019200000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("2.076918743413931051412198531688038400000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("4.153837486827862102824397063376076800000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("8.307674973655724205648794126752153600000000000000000000000000000000000000000000000000000000000000000e34"),
+ cpp_float("1.661534994731144841129758825350430720000000000000000000000000000000000000000000000000000000000000000e35"),
+ cpp_float("3.323069989462289682259517650700861440000000000000000000000000000000000000000000000000000000000000000e35"),
+ cpp_float("6.646139978924579364519035301401722880000000000000000000000000000000000000000000000000000000000000000e35"),
+ cpp_float("1.329227995784915872903807060280344576000000000000000000000000000000000000000000000000000000000000000e36"),
+ cpp_float("2.658455991569831745807614120560689152000000000000000000000000000000000000000000000000000000000000000e36"),
+ cpp_float("5.316911983139663491615228241121378304000000000000000000000000000000000000000000000000000000000000000e36"),
+ cpp_float("1.063382396627932698323045648224275660800000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("2.126764793255865396646091296448551321600000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("4.253529586511730793292182592897102643200000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("8.507059173023461586584365185794205286400000000000000000000000000000000000000000000000000000000000000e37"),
+ cpp_float("1.701411834604692317316873037158841057280000000000000000000000000000000000000000000000000000000000000e38")
}};
if((p > static_cast<boost::int64_t>(-128)) && (p < static_cast<boost::int64_t>(+128)))
@@ -2414,11 +2414,11 @@
else if(p < static_cast<boost::int64_t>(std::numeric_limits<boost::uint64_t>::digits))
{
const boost::uint64_t p2 = static_cast<boost::uint64_t>(static_cast<boost::uint64_t>(1uLL) << p);
- return mp_float(p2);
+ return cpp_float(p2);
}
else
{
- mp_float<Digits10> t;
+ cpp_float<Digits10> t;
default_ops::detail::pow_imp(t, two(), p, mpl::true_());
return t;
}
@@ -2426,49 +2426,49 @@
template <unsigned Digits10>
-inline void add(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void add(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result += o;
}
template <unsigned Digits10>
-inline void subtract(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void subtract(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result -= o;
}
template <unsigned Digits10>
-inline void multiply(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void multiply(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result *= o;
}
template <unsigned Digits10>
-inline void divide(mp_float<Digits10>& result, const mp_float<Digits10>& o)
+inline void divide(cpp_float<Digits10>& result, const cpp_float<Digits10>& o)
{
result /= o;
}
template <unsigned Digits10>
-inline void add(mp_float<Digits10>& result, const unsigned long long& o)
+inline void add(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.add_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void subtract(mp_float<Digits10>& result, const unsigned long long& o)
+inline void subtract(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.sub_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void multiply(mp_float<Digits10>& result, const unsigned long long& o)
+inline void multiply(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.mul_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void divide(mp_float<Digits10>& result, const unsigned long long& o)
+inline void divide(cpp_float<Digits10>& result, const unsigned long long& o)
{
result.div_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void add(mp_float<Digits10>& result, long long o)
+inline void add(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
result.sub_unsigned_long_long(-o);
@@ -2476,7 +2476,7 @@
result.add_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void subtract(mp_float<Digits10>& result, long long o)
+inline void subtract(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
result.add_unsigned_long_long(-o);
@@ -2484,7 +2484,7 @@
result.sub_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void multiply(mp_float<Digits10>& result, long long o)
+inline void multiply(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
{
@@ -2495,7 +2495,7 @@
result.mul_unsigned_long_long(o);
}
template <unsigned Digits10>
-inline void divide(mp_float<Digits10>& result, long long o)
+inline void divide(cpp_float<Digits10>& result, long long o)
{
if(o < 0)
{
@@ -2507,17 +2507,17 @@
}
template <unsigned Digits10>
-inline void convert_to(unsigned long long* result, const mp_float<Digits10>& val)
+inline void convert_to(unsigned long long* result, const cpp_float<Digits10>& val)
{
*result = val.extract_unsigned_long_long();
}
template <unsigned Digits10>
-inline void convert_to(long long* result, const mp_float<Digits10>& val)
+inline void convert_to(long long* result, const cpp_float<Digits10>& val)
{
*result = val.extract_signed_long_long();
}
template <unsigned Digits10>
-inline void convert_to(long double* result, mp_float<Digits10>& val)
+inline void convert_to(long double* result, cpp_float<Digits10>& val)
{
*result = val.extract_long_double();
}
@@ -2526,7 +2526,7 @@
// Non member function support:
//
template <unsigned Digits10>
-inline int eval_fpclassify(const mp_float<Digits10>& x)
+inline int eval_fpclassify(const cpp_float<Digits10>& x)
{
if(x.isinf())
return FP_INFINITE;
@@ -2538,7 +2538,7 @@
}
template <unsigned Digits10>
-inline void eval_abs(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_abs(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(x.isneg())
@@ -2546,7 +2546,7 @@
}
template <unsigned Digits10>
-inline void eval_fabs(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_fabs(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(x.isneg())
@@ -2554,14 +2554,14 @@
}
template <unsigned Digits10>
-inline void eval_sqrt(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_sqrt(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
result.calculate_sqrt();
}
template <unsigned Digits10>
-inline void eval_floor(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_floor(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(!x.isfinite() || x.isint())
@@ -2570,12 +2570,12 @@
}
if(x.isneg())
- result -= mp_float<Digits10>::one();
+ result -= cpp_float<Digits10>::one();
result = result.extract_integer_part();
}
template <unsigned Digits10>
-inline void eval_ceil(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_ceil(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
result = x;
if(!x.isfinite() || x.isint())
@@ -2584,16 +2584,16 @@
}
if(!x.isneg())
- result += mp_float<Digits10>::one();
+ result += cpp_float<Digits10>::one();
result = result.extract_integer_part();
}
template <unsigned Digits10>
-inline void eval_trunc(mp_float<Digits10>& result, const mp_float<Digits10>& x)
+inline void eval_trunc(cpp_float<Digits10>& result, const cpp_float<Digits10>& x)
{
if(!x.isfinite())
{
- result = boost::math::policies::raise_rounding_error("boost::multiprecision::trunc<%1%>(%1%)", 0, mp_number<mp_float<Digits10> >(x), 0, boost::math::policies::policy<>()).backend();
+ result = boost::math::policies::raise_rounding_error("boost::multiprecision::trunc<%1%>(%1%)", 0, mp_number<cpp_float<Digits10> >(x), 0, boost::math::policies::policy<>()).backend();
return;
}
else if(x.isint())
@@ -2605,14 +2605,14 @@
}
template <unsigned Digits10>
-inline void eval_ldexp(mp_float<Digits10>& result, const mp_float<Digits10>& x, long long e)
+inline void eval_ldexp(cpp_float<Digits10>& result, const cpp_float<Digits10>& x, long long e)
{
result = x;
- result *= mp_float<Digits10>::pow2(e);
+ result *= cpp_float<Digits10>::pow2(e);
}
template <unsigned Digits10>
-inline void eval_frexp(mp_float<Digits10>& result, const mp_float<Digits10>& x, long long* e)
+inline void eval_frexp(cpp_float<Digits10>& result, const cpp_float<Digits10>& x, long long* e)
{
result = x;
if(result.isneg())
@@ -2624,16 +2624,16 @@
throw std::runtime_error("Exponent is too large to be represented as a power of 2.");
t *= 3;
- result *= mp_float<Digits10>::pow2(-t);
+ result *= cpp_float<Digits10>::pow2(-t);
- while(result.compare(mp_float<Digits10>::one()) >= 0)
+ while(result.compare(cpp_float<Digits10>::one()) >= 0)
{
- result /= mp_float<Digits10>::two();
+ result /= cpp_float<Digits10>::two();
++t;
}
- while(result.compare(mp_float<Digits10>::half()) < 0)
+ while(result.compare(cpp_float<Digits10>::half()) < 0)
{
- result *= mp_float<Digits10>::two();
+ result *= cpp_float<Digits10>::two();
--t;
}
*e = t;
@@ -2642,7 +2642,7 @@
}
template <unsigned Digits10>
-inline void eval_frexp(mp_float<Digits10>& result, const mp_float<Digits10>& x, int* e)
+inline void eval_frexp(cpp_float<Digits10>& result, const cpp_float<Digits10>& x, int* e)
{
long long t;
eval_frexp(result, x, &t);
@@ -2651,15 +2651,15 @@
*e = static_cast<int>(t);
}
-typedef mp_number<mp_float<50> > mp_float_50;
-typedef mp_number<mp_float<100> > mp_float_100;
+typedef mp_number<cpp_float<50> > cpp_float_50;
+typedef mp_number<cpp_float<100> > cpp_float_100;
}}
namespace std
{
template <unsigned Digits10>
- class numeric_limits<boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > >
+ class numeric_limits<boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > >
{
public:
static const bool is_specialized = true;
@@ -2670,13 +2670,13 @@
static const bool is_modulo = false;
static const bool is_iec559 = false;
static const int digits = static_cast<int>(((Digits10 + 1) * 1000L) / 301L);
- static const int digits10 = boost::multiprecision::mp_float<Digits10>::mp_float_digits10;
- static const int max_digits10 = boost::multiprecision::mp_float<Digits10>::mp_float_max_digits10;
- static const boost::int64_t min_exponent = boost::multiprecision::mp_float<Digits10>::mp_float_min_exp; // Type differs from int.
- static const boost::int64_t min_exponent10 = boost::multiprecision::mp_float<Digits10>::mp_float_min_exp10; // Type differs from int.
- static const boost::int64_t max_exponent = boost::multiprecision::mp_float<Digits10>::mp_float_max_exp; // Type differs from int.
- static const boost::int64_t max_exponent10 = boost::multiprecision::mp_float<Digits10>::mp_float_max_exp10; // Type differs from int.
- static const int radix = boost::multiprecision::mp_float<Digits10>::mp_radix;
+ static const int digits10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_digits10;
+ static const int max_digits10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_max_digits10;
+ static const boost::int64_t min_exponent = boost::multiprecision::cpp_float<Digits10>::cpp_float_min_exp; // Type differs from int.
+ static const boost::int64_t min_exponent10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_min_exp10; // Type differs from int.
+ static const boost::int64_t max_exponent = boost::multiprecision::cpp_float<Digits10>::cpp_float_max_exp; // Type differs from int.
+ static const boost::int64_t max_exponent10 = boost::multiprecision::cpp_float<Digits10>::cpp_float_max_exp10; // Type differs from int.
+ static const int radix = boost::multiprecision::cpp_float<Digits10>::mp_radix;
static const std::float_round_style round_style = std::round_to_nearest;
static const bool has_infinity = true;
static const bool has_quiet_NaN = true;
@@ -2686,15 +2686,15 @@
static const bool traps = false;
static const bool tinyness_before = false;
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > (min) (void) throw() { return (boost::multiprecision::mp_float<Digits10>::min)(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > (max) (void) throw() { return (boost::multiprecision::mp_float<Digits10>::max)(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > lowest (void) throw() { return boost::multiprecision::mp_float<Digits10>::zero(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > epsilon (void) throw() { return boost::multiprecision::mp_float<Digits10>::eps(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > round_error (void) throw() { return 0.5L; }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > infinity (void) throw() { return boost::multiprecision::mp_float<Digits10>::inf(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > quiet_NaN (void) throw() { return boost::multiprecision::mp_float<Digits10>::nan(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > signaling_NaN(void) throw() { return boost::multiprecision::mp_float<Digits10>::zero(); }
- static const boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> > denorm_min (void) throw() { return boost::multiprecision::mp_float<Digits10>::zero(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > (min) (void) throw() { return (boost::multiprecision::cpp_float<Digits10>::min)(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > (max) (void) throw() { return (boost::multiprecision::cpp_float<Digits10>::max)(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > lowest (void) throw() { return boost::multiprecision::cpp_float<Digits10>::zero(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > epsilon (void) throw() { return boost::multiprecision::cpp_float<Digits10>::eps(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > round_error (void) throw() { return 0.5L; }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > infinity (void) throw() { return boost::multiprecision::cpp_float<Digits10>::inf(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > quiet_NaN (void) throw() { return boost::multiprecision::cpp_float<Digits10>::nan(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > signaling_NaN(void) throw() { return boost::multiprecision::cpp_float<Digits10>::zero(); }
+ static const boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> > denorm_min (void) throw() { return boost::multiprecision::cpp_float<Digits10>::zero(); }
};
}
@@ -2703,7 +2703,7 @@
namespace policies{
template <unsigned Digits10, class Policy>
-struct precision< boost::multiprecision::mp_number<boost::multiprecision::mp_float<Digits10> >, Policy>
+struct precision< boost::multiprecision::mp_number<boost::multiprecision::cpp_float<Digits10> >, Policy>
{
typedef typename Policy::precision_type precision_type;
typedef digits2<((Digits10 + 1) * 1000L) / 301L> digits_2;
Modified: sandbox/big_number/libs/multiprecision/example/mp_float_snips.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/example/mp_float_snips.cpp (original)
+++ sandbox/big_number/libs/multiprecision/example/mp_float_snips.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -3,19 +3,19 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-#include <boost/multiprecision/mp_float.hpp>
+#include <boost/multiprecision/cpp_float.hpp>
#include <iostream>
void t1()
{
- //[mp_float_eg
- //=#include <boost/multiprecision/mp_float.hpp>
+ //[cpp_float_eg
+ //=#include <boost/multiprecision/cpp_float.hpp>
using namespace boost::multiprecision;
// Operations at fixed precision and full numeric_limits support:
- mp_float_100 b = 2;
- std::cout << std::numeric_limits<mp_float_100>::digits << std::endl;
+ cpp_float_100 b = 2;
+ std::cout << std::numeric_limits<cpp_float_100>::digits << std::endl;
std::cout << log(b) << std::endl; // print log(2)
//]
}
Modified: sandbox/big_number/libs/multiprecision/test/Jamfile.v2
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/Jamfile.v2 (original)
+++ sandbox/big_number/libs/multiprecision/test/Jamfile.v2 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -36,8 +36,8 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_arithmetic_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_arithmetic_cpp_float ;
run test_arithmetic.cpp gmp
: # command line
@@ -146,9 +146,9 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
+ <define>TEST_CPP_FLOAT
[ check-target-builds ../config//has_mpfr : : <build>no ]
- : test_numeric_limits_mp_float ;
+ : test_numeric_limits_cpp_float ;
run mp_number_concept_check.cpp mpfr
: # command line
@@ -202,8 +202,8 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : mp_number_concept_check_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : mp_number_concept_check_cpp_float ;
run mp_number_concept_check.cpp
: # command line
@@ -312,50 +312,50 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_exp_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_exp_cpp_float ;
run test_log.cpp
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_log_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_log_cpp_float ;
run test_pow.cpp
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_pow_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_pow_cpp_float ;
run test_sinh.cpp
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_sinh_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_sinh_cpp_float ;
run test_cosh.cpp
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_cosh_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_cosh_cpp_float ;
run test_tanh.cpp
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_tanh_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_tanh_cpp_float ;
run test_sin.cpp
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_sin_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_sin_cpp_float ;
run test_sin.cpp gmp
: # command line
@@ -377,8 +377,8 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_cos_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_cos_cpp_float ;
run test_cos.cpp gmp
: # command line
@@ -400,8 +400,8 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_asin_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_asin_cpp_float ;
run test_asin.cpp gmp
: # command line
@@ -423,8 +423,8 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_acos_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_acos_cpp_float ;
run test_acos.cpp gmp
: # command line
@@ -454,8 +454,8 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
- : test_atan_mp_float ;
+ <define>TEST_CPP_FLOAT
+ : test_atan_cpp_float ;
run test_atan.cpp mpfr
: # command line
@@ -489,7 +489,7 @@
: # requirements
[ check-target-builds ../config//has_mpfr : : <build>no ] ;
-run ../example/mp_float_snips.cpp ;
+run ../example/cpp_float_snips.cpp ;
run test_round.cpp
: # command line
@@ -518,9 +518,9 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
+ <define>TEST_CPP_FLOAT
[ check-target-builds ../config//has_mpfr : : <build>no ]
- : test_round_mp_float ;
+ : test_round_cpp_float ;
run test_fpclassify.cpp
: # command line
@@ -549,7 +549,7 @@
: # command line
: # input files
: # requirements
- <define>TEST_MP_FLOAT
+ <define>TEST_CPP_FLOAT
[ check-target-builds ../config//has_mpfr : : <build>no ]
- : test_fpclassify_mp_float ;
+ : test_fpclassify_cpp_float ;
Modified: sandbox/big_number/libs/multiprecision/test/linpack-benchmark.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/linpack-benchmark.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/linpack-benchmark.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -25,9 +25,9 @@
#elif defined(TEST_MPFRXX)
#include <gmpfrxx.h>
typedef mpfr_class real_type;
-#elif defined(TEST_MP_FLOAT)
-#include <boost/multiprecision/mp_float.hpp>
-typedef boost::multiprecision::mp_float_50 real_type;
+#elif defined(TEST_CPP_FLOAT)
+#include <boost/multiprecision/cpp_float.hpp>
+typedef boost::multiprecision::cpp_float_50 real_type;
#elif defined(TEST_MPFR_50)
#include <boost/multiprecision/mpfr.hpp>
typedef boost::multiprecision::mpfr_float_50 real_type;
@@ -102,8 +102,8 @@
#elif defined(TEST_MPFRXX)
std::cout << "Testing mpfr_class at 50 decimal degits" << std::endl;
mpfr_set_default_prec(((50 + 1) * 1000L) / 301L);
-#elif defined(TEST_MP_FLOAT)
- std::cout << "Testing mp_number<mp_float<50> >" << std::endl;
+#elif defined(TEST_CPP_FLOAT)
+ std::cout << "Testing mp_number<cpp_float<50> >" << std::endl;
#else
std::cout << "Testing double" << std::endl;
#endif
@@ -911,8 +911,8 @@
{
#if defined(TEST_MPF_100) || defined(TEST_MPFR_100) || defined(TEST_GMPXX) || defined(TEST_MPFRXX)
return std::ldexp(1.0, 1 - ((100 + 1) * 1000L) / 301L);
-#elif defined(TEST_MP_FLOAT_BN)
- return std::pow(10.0, 1-std::numeric_limits<efx::mp_float_50>::digits10);
+#elif defined(TEST_CPP_FLOAT_BN)
+ return std::pow(10.0, 1-std::numeric_limits<efx::cpp_float_50>::digits10);
#else
return CAST_TO_RT(std::numeric_limits<real_type>::epsilon());
#endif
@@ -1234,7 +1234,7 @@
times for array with leading dimension of1001
279.96 0.84 280.8 2.3813 0.83988 5014.3
-boost::multiprecision::ef::mp_float_50:
+boost::multiprecision::ef::cpp_float_50:
~~~~~~~~~~~~~~~~~~~~~~~~~
norm. resid resid machep x(1) x(n)
Modified: sandbox/big_number/libs/multiprecision/test/mp_number_concept_check.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/mp_number_concept_check.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/mp_number_concept_check.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -5,7 +5,7 @@
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-// This tests two things: that mp_float_50 meets our
+// This tests two things: that cpp_float_50 meets our
// conceptual requirements, and that we can instantiate
// all our distributions and special functions on this type.
//
@@ -21,7 +21,7 @@
#endif
#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) \
- && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR_50)\
+ && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)\
&& !defined(TEST_MPFR_6) && !defined(TEST_MPFR_15) && !defined(TEST_MPFR_17) && !defined(TEST_MPFR_30)
# define TEST_MPF_50
# define TEST_BACKEND
@@ -31,7 +31,7 @@
# define TEST_MPFR_15
# define TEST_MPFR_17
# define TEST_MPFR_30
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -48,8 +48,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
#if defined(TEST_MPFR_50) || defined(TEST_MPFR_6) || defined(TEST_MPFR_15) || defined(TEST_MPFR_17) || defined(TEST_MPFR_30)
#include <boost/multiprecision/mpfr.hpp>
@@ -81,8 +81,8 @@
#ifdef TEST_MPFR_30
instantiate(boost::multiprecision::mp_number<boost::multiprecision::mpfr_float_backend<30> >());
#endif
-#ifdef TEST_MP_FLOAT
- instantiate(boost::multiprecision::mp_float_50());
+#ifdef TEST_CPP_FLOAT
+ instantiate(boost::multiprecision::cpp_float_50());
#endif
}
@@ -112,8 +112,8 @@
#ifdef TEST_MPFR_50
BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<boost::multiprecision::mpfr_float_50>));
#endif
-#ifdef TEST_MP_FLOAT
- BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<boost::multiprecision::mp_float_50>));
+#ifdef TEST_CPP_FLOAT
+ BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<boost::multiprecision::cpp_float_50>));
#endif
}
Modified: sandbox/big_number/libs/multiprecision/test/test_acos.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_acos.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_acos.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -96,9 +96,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -6,14 +6,14 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/math/special_functions/pow.hpp>
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
# define TEST_MPF
# define TEST_BACKEND
# define TEST_MPZ
# define TEST_MPFR
# define TEST_MPFR_50
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
# define TEST_MPQ
#ifdef _MSC_VER
@@ -31,8 +31,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
#if defined(TEST_MPFR) || defined(TEST_MPFR_50)
#include <boost/multiprecision/mpfr.hpp>
@@ -861,8 +861,8 @@
#ifdef TEST_MPQ
test<boost::multiprecision::mpq_rational>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
#endif
#ifdef TEST_MPFR
test<boost::multiprecision::mpfr_float>();
Modified: sandbox/big_number/libs/multiprecision/test/test_asin.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_asin.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_asin.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -93,9 +93,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_atan.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_atan.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_atan.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -237,9 +237,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_cos.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_cos.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_cos.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -282,9 +282,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_cosh.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_cosh.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_cosh.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -128,9 +128,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_exp.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_exp.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_exp.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -173,9 +173,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_fpclassify.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_fpclassify.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_fpclassify.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -10,11 +10,11 @@
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -34,8 +34,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
#ifdef _MSC_VER
@@ -312,9 +312,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
#ifdef TEST_BACKEND
test<boost::multiprecision::mp_number<boost::multiprecision::concepts::mp_number_backend_float_architype> >();
Modified: sandbox/big_number/libs/multiprecision/test/test_log.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_log.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_log.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -166,7 +166,11 @@
e = relative_error(val, T(-data[k]));
err = e.template convert_to<unsigned>();
if(err > max_err)
+ {
max_err = err;
+ std::cout << val << std::endl;
+ std::cout << T(-data[k]) << std::endl;
+ }
val = boost::multiprecision::log10(tenth + pi * (100 * k) * (100 * k));
e = relative_error(val, T(data[k] / logten));
@@ -199,9 +203,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_numeric_limits.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_numeric_limits.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_numeric_limits.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -5,14 +5,14 @@
#include <boost/detail/lightweight_test.hpp>
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
# define TEST_MPF
# define TEST_BACKEND
# define TEST_MPZ
# define TEST_MPFR
# define TEST_MPFR_50
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
# define TEST_MPQ
#ifdef _MSC_VER
@@ -30,8 +30,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
#if defined(TEST_MPFR) || defined(TEST_MPFR_50)
#include <boost/multiprecision/mpfr.hpp>
@@ -159,9 +159,9 @@
#ifdef TEST_MPQ
test<boost::multiprecision::mpq_rational>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
#ifdef TEST_MPFR
test<boost::multiprecision::mpfr_float>();
Modified: sandbox/big_number/libs/multiprecision/test/test_pow.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_pow.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_pow.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
# define TEST_MPFR_50
#ifdef _MSC_VER
@@ -37,8 +37,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -576,9 +576,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_round.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_round.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_round.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -16,11 +16,11 @@
catch(...){ BOOST_ERROR("Incorrect exception type thrown"); }
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -40,8 +40,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
boost::mt19937 rng;
@@ -387,9 +387,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
#ifdef TEST_BACKEND
test<boost::multiprecision::mp_number<boost::multiprecision::concepts::mp_number_backend_float_architype> >();
Modified: sandbox/big_number/libs/multiprecision/test/test_sin.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_sin.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_sin.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -231,7 +231,12 @@
T e = relative_error(val, small_data[k]);
unsigned err = e.template convert_to<unsigned>();
if(err > max_err)
+ {
+ std::cout << val << std::endl;
+ std::cout << small_data[k] << std::endl;
+ std::cout << e << std::endl;
max_err = err;
+ }
val = sin(-(euler_gamma + k) / 53);
e = relative_error(val, T(-small_data[k]));
err = e.template convert_to<unsigned>();
@@ -285,8 +290,8 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_sinh.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_sinh.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_sinh.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -128,9 +128,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
Modified: sandbox/big_number/libs/multiprecision/test/test_tanh.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_tanh.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_tanh.cpp 2011-11-12 08:15:33 EST (Sat, 12 Nov 2011)
@@ -12,11 +12,11 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_MP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
-# define TEST_MP_FLOAT
+# define TEST_CPP_FLOAT
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,8 +36,8 @@
#ifdef TEST_BACKEND
#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
#endif
-#ifdef TEST_MP_FLOAT
-#include <boost/multiprecision/mp_float.hpp>
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
#endif
template <class T>
@@ -128,9 +128,9 @@
test<boost::multiprecision::mpfr_float_50>();
test<boost::multiprecision::mpfr_float_100>();
#endif
-#ifdef TEST_MP_FLOAT
- test<boost::multiprecision::mp_float_50>();
- test<boost::multiprecision::mp_float_100>();
+#ifdef TEST_CPP_FLOAT
+ test<boost::multiprecision::cpp_float_50>();
+ test<boost::multiprecision::cpp_float_100>();
#endif
return boost::report_errors();
}
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