#include <cpp_bin_float.hpp>
Public Types | |
typedef cpp_int_backend < is_void< Allocator >::value?bit_count:0, bit_count, is_void< Allocator > ::value?unsigned_magnitude:signed_magnitude, unchecked, Allocator > | rep_type |
typedef cpp_int_backend < is_void< Allocator >::value?2 *bit_count:0, 2 *bit_count, is_void< Allocator >::value?unsigned_magnitude:signed_magnitude, unchecked, Allocator > | double_rep_type |
typedef rep_type::signed_types | signed_types |
typedef rep_type::unsigned_types | unsigned_types |
typedef boost::mpl::list < double, long double > | float_types |
typedef Exponent | exponent_type |
Public Member Functions | |
BOOST_STATIC_ASSERT_MSG (MinExponent >=min_exponent_limit,"Template parameter MinExponent is too negative for our internal logic to function correctly, sorry!") | |
BOOST_STATIC_ASSERT_MSG (MaxExponent<=max_exponent_limit,"Template parameter MaxExponent is too large for our internal logic to function correctly, sorry!") | |
BOOST_STATIC_ASSERT_MSG (MinExponent<=0,"Template parameter MinExponent can not be positive!") | |
BOOST_STATIC_ASSERT_MSG (MaxExponent >=0,"Template parameter MaxExponent can not be negative!") | |
cpp_bin_float () | |
cpp_bin_float (const cpp_bin_float &o) | |
template<unsigned D, digit_base_type B, class A , class E , E MinE, E MaxE> | |
cpp_bin_float (const cpp_bin_float< D, B, A, E, MinE, MaxE > &o, typename boost::enable_if_c<(bit_count >=cpp_bin_float< D, B, A, E, MinE, MaxE >::bit_count)>::type const *=0) | |
template<unsigned D, digit_base_type B, class A , class E , E MinE, E MaxE> | |
cpp_bin_float (const cpp_bin_float< D, B, A, E, MinE, MaxE > &o, typename boost::disable_if_c<(bit_count >=cpp_bin_float< D, B, A, E, MinE, MaxE >::bit_count)>::type const *=0) | |
template<class Float > | |
cpp_bin_float (const Float &f, typename boost::enable_if_c< (number_category< Float >::value==number_kind_floating_point)&&(std::numeric_limits< Float >::digits<=(int) bit_count)&&(std::numeric_limits< Float >::radix==2) >::type const *=0) | |
cpp_bin_float & | operator= (const cpp_bin_float &o) |
template<unsigned D, digit_base_type B, class A , class E , E MinE, E MaxE> | |
cpp_bin_float & | operator= (const cpp_bin_float< D, B, A, E, MinE, MaxE > &o) |
template<class Float > | |
boost::enable_if_c < (number_category< Float > ::value==number_kind_floating_point)&&(std::numeric_limits < Float >::digits<=(int) bit_count)&&(std::numeric_limits < Float >::radix==2), cpp_bin_float & >::type | operator= (const Float &f) |
template<class Float > | |
boost::enable_if_c < is_floating_point< Float > ::value, cpp_bin_float & > ::type | assign_float (Float f) |
template<class Float > | |
boost::enable_if_c < (number_category< Float > ::value==number_kind_floating_point)&&!is_floating_point < Float >::value, cpp_bin_float & >::type | assign_float (Float f) |
template<class I > | |
boost::enable_if< is_integral < I >, cpp_bin_float & >::type | operator= (const I &i) |
cpp_bin_float & | operator= (const char *s) |
void | swap (cpp_bin_float &o) BOOST_NOEXCEPT |
std::string | str (std::streamsize dig, std::ios_base::fmtflags f) const |
void | negate () |
int | compare (const cpp_bin_float &o) const BOOST_NOEXCEPT |
template<class A > | |
int | compare (const A &o) const BOOST_NOEXCEPT |
rep_type & | bits () |
const rep_type & | bits () const |
exponent_type & | exponent () |
const exponent_type & | exponent () const |
bool & | sign () |
const bool & | sign () const |
void | check_invariants () |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Static Public Attributes | |
static const unsigned | bit_count = DigitBase == digit_base_2 ? Digits : (Digits * 1000uL) / 301uL + ((Digits * 1000uL) % 301 ? 2u : 1u) |
static const exponent_type | max_exponent_limit = boost::integer_traits<exponent_type>::const_max - 2 * static_cast<exponent_type>(bit_count) |
static const exponent_type | min_exponent_limit = boost::integer_traits<exponent_type>::const_min + 2 * static_cast<exponent_type>(bit_count) |
static const exponent_type | max_exponent = MaxExponent == 0 ? max_exponent_limit : MaxExponent |
static const exponent_type | min_exponent = MinExponent == 0 ? min_exponent_limit : MinExponent |
static const exponent_type | exponent_zero = max_exponent + 1 |
static const exponent_type | exponent_infinity = max_exponent + 2 |
static const exponent_type | exponent_nan = max_exponent + 3 |
typedef cpp_int_backend<is_void<Allocator>::value ? 2 * bit_count : 0, 2 * bit_count, is_void<Allocator>::value ? unsigned_magnitude : signed_magnitude, unchecked, Allocator> boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::double_rep_type |
typedef Exponent boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_type |
typedef boost::mpl::list<double, long double> boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::float_types |
typedef cpp_int_backend<is_void<Allocator>::value ? bit_count : 0, bit_count, is_void<Allocator>::value ? unsigned_magnitude : signed_magnitude, unchecked, Allocator> boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::rep_type |
typedef rep_type::signed_types boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::signed_types |
typedef rep_type::unsigned_types boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::unsigned_types |
|
inline |
|
inline |
|
inline |
References boost::multiprecision::backends::b, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::bits(), boost::multiprecision::backends::copy_and_round(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::sign().
|
inlineexplicit |
References boost::multiprecision::backends::b, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::bits(), boost::multiprecision::backends::copy_and_round(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::sign().
|
inline |
|
inline |
References boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::bits(), BOOST_MATH_STD_USING, boost::multiprecision::backends::eval_add(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_infinity, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_nan, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_zero, boost::math::fpclassify(), boost::math::ef::frexp(), boost::math::ef::itrunc(), boost::math::ef::ldexp(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::negate().
Referenced by boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::cpp_bin_float(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::operator=().
|
inline |
References boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::bits(), BOOST_MATH_STD_USING, boost::multiprecision::backends::eval_add(), boost::multiprecision::backends::eval_convert_to(), boost::multiprecision::backends::eval_fpclassify(), boost::multiprecision::backends::eval_frexp(), boost::multiprecision::backends::eval_get_sign(), boost::multiprecision::backends::eval_ldexp(), boost::multiprecision::backends::eval_subtract(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_infinity, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_nan, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_zero, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::negate(), and boost::detail::type.
|
inline |
Referenced by boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::assign_float(), boost::multiprecision::backends::copy_and_round(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::cpp_bin_float(), boost::multiprecision::backends::do_eval_add(), boost::multiprecision::backends::do_eval_subtract(), boost::multiprecision::backends::eval_ceil(), boost::multiprecision::backends::eval_convert_to(), boost::multiprecision::backends::eval_divide(), boost::multiprecision::backends::eval_eq(), boost::multiprecision::backends::eval_floor(), boost::multiprecision::backends::eval_multiply(), boost::multiprecision::backends::eval_sqrt(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::operator=().
|
inline |
boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::BOOST_STATIC_ASSERT_MSG | ( | MinExponent >= | min_exponent_limit, |
"Template parameter MinExponent is too negative for our internal logic to function | correctly, | ||
sorry!" | |||
) |
boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::BOOST_STATIC_ASSERT_MSG | ( | MaxExponent<= | max_exponent_limit, |
"Template parameter MaxExponent is too large for our internal logic to function | correctly, | ||
sorry!" | |||
) |
boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::BOOST_STATIC_ASSERT_MSG | ( | MinExponent<= | 0, |
"Template parameter MinExponent can not be positive!" | |||
) |
boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::BOOST_STATIC_ASSERT_MSG | ( | MaxExponent >= | 0, |
"Template parameter MaxExponent can not be negative!" | |||
) |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by boost::multiprecision::backends::copy_and_round(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::cpp_bin_float(), boost::multiprecision::backends::do_eval_add(), boost::multiprecision::backends::do_eval_subtract(), boost::multiprecision::backends::eval_ceil(), boost::multiprecision::backends::eval_convert_to(), boost::multiprecision::backends::eval_divide(), boost::multiprecision::backends::eval_eq(), boost::multiprecision::backends::eval_exp_taylor(), boost::multiprecision::backends::eval_floor(), boost::multiprecision::backends::eval_fpclassify(), boost::multiprecision::backends::eval_frexp(), boost::multiprecision::backends::eval_get_sign(), boost::multiprecision::backends::eval_is_zero(), boost::multiprecision::backends::eval_ldexp(), boost::multiprecision::backends::eval_multiply(), boost::multiprecision::backends::eval_sqrt(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::operator=().
|
inline |
|
inline |
Referenced by boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::assign_float(), boost::multiprecision::backends::do_eval_add(), boost::multiprecision::backends::do_eval_subtract(), boost::multiprecision::backends::eval_divide(), boost::multiprecision::backends::eval_exp(), boost::multiprecision::backends::eval_ldexp(), and boost::multiprecision::backends::eval_multiply().
|
inline |
|
inline |
References boost::multiprecision::backends::b, boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::bits(), boost::multiprecision::backends::copy_and_round(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::sign().
|
inline |
|
inline |
References boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::bit_count, BOOST_ASSERT, boost::multiprecision::backends::eval_bit_test(), boost::multiprecision::backends::eval_left_shift(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::exponent_zero, boost::multiprecision::backends::detail::is_negative, boost::multiprecision::msb(), boost::multiprecision::backends::shift, and boost::detail::type.
cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinE, MaxE > & boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinE, MaxE >::operator= | ( | const char * | s | ) |
References boost::multiprecision::number< Backend, ExpressionTemplates >::backend(), boost::multiprecision::bit_test(), BOOST_ASSERT, BOOST_THROW_EXCEPTION, boost::multiprecision::backends::copy_and_round(), boost::multiprecision::divide_qr(), boost::sinks::event_log::error, boost::multiprecision::cpp_bf_io_detail::get_round_mode(), boost::spirit::lex::lexertl::detail::L(), boost::multiprecision::lsb(), boost::multiprecision::msb(), boost::n, boost::multiprecision::backends::negate(), boost::multiprecision::cpp_bf_io_detail::restricted_multiply(), boost::multiprecision::cpp_bf_io_detail::restricted_pow(), boost::asio::s, boost::multiprecision::backends::shift, boost::multiprecision::backends::sign(), and boost::multiprecision::backends::t.
|
inline |
|
inline |
Referenced by boost::multiprecision::backends::copy_and_round(), boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::cpp_bin_float(), boost::multiprecision::backends::do_eval_add(), boost::multiprecision::backends::do_eval_subtract(), boost::multiprecision::backends::eval_abs(), boost::multiprecision::backends::eval_add(), boost::multiprecision::backends::eval_ceil(), boost::multiprecision::backends::eval_convert_to(), boost::multiprecision::backends::eval_divide(), boost::multiprecision::backends::eval_eq(), boost::multiprecision::backends::eval_fabs(), boost::multiprecision::backends::eval_floor(), boost::multiprecision::backends::eval_get_sign(), boost::multiprecision::backends::eval_ldexp(), boost::multiprecision::backends::eval_multiply(), boost::multiprecision::backends::eval_sqrt(), boost::multiprecision::backends::eval_subtract(), and boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent >::operator=().
|
inline |
std::string boost::multiprecision::backends::cpp_bin_float< Digits, DigitBase, Allocator, Exponent, MinE, MaxE >::str | ( | std::streamsize | dig, |
std::ios_base::fmtflags | f | ||
) | const |
References boost::geometry::math::abs(), BOOST_ASSERT, boost::multiprecision::backends::c, boost::chrono::ceil(), boost::multiprecision::number< Backend, ExpressionTemplates >::compare(), boost::multiprecision::divide_qr(), boost::sinks::event_log::error, boost::chrono::floor(), boost::multiprecision::cpp_bf_io_detail::get_round_mode(), boost::multiprecision::backends::i, boost::multiprecision::msb(), pow(), boost::multiprecision::cpp_bf_io_detail::restricted_multiply(), boost::multiprecision::cpp_bf_io_detail::restricted_pow(), boost::asio::s, boost::multiprecision::backends::shift, boost::multiprecision::backends::sign(), boost::multiprecision::number< Backend, ExpressionTemplates >::str(), and boost::multiprecision::backends::t.
|
inline |
References boost::swap.
Referenced by boost::multiprecision::backends::eval_exp().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |