bpp-phyl3
3.0.0
|
#include <Bpp/Phyl/Likelihood/DataFlow/ExtendedFloat.h>
Public Types | |
using | FloatType = double |
using | ExtType = int |
Public Member Functions | |
constexpr | ExtendedFloat (FloatType f=0.0, ExtType e=0) noexcept |
ExtendedFloat (const ExtendedFloat &ef) noexcept | |
const FloatType & | float_part () const noexcept |
const ExtType & | exponent_part () const noexcept |
bool | normalize_big () noexcept |
bool | normalize_small () |
void | normalize () noexcept |
ExtendedFloat & | operator= (const ExtendedFloat &ef) |
ExtendedFloat | operator+ (const ExtendedFloat &rhs) const |
ExtendedFloat | operator- (const ExtendedFloat &rhs) const |
template<typename F , typename = typename std::enable_if<std::is_arithmetic<F>::value>::type> | |
ExtendedFloat | operator- (const F &rhs) const |
ExtendedFloat | operator* (const ExtendedFloat &rhs) const |
template<typename F , typename = typename std::enable_if<std::is_arithmetic<F>::value>::type> | |
ExtendedFloat | operator* (const F &rhs) const |
ExtendedFloat | operator/ (const ExtendedFloat &rhs) const |
ExtendedFloat & | operator*= (const ExtendedFloat &rhs) |
ExtendedFloat & | operator/= (const ExtendedFloat &rhs) |
ExtendedFloat & | operator+= (const ExtendedFloat &rhs) |
ExtendedFloat & | operator-= (const ExtendedFloat &rhs) |
ExtendedFloat | operator- () const |
ExtendedFloat | pow (double exp) const |
ExtendedFloat | pow (int exp) const |
bool | operator== (const ExtendedFloat &rhs) const |
bool | operator!= (const ExtendedFloat &rhs) const |
bool | operator< (const ExtendedFloat &rhs) const |
bool | operator<= (const ExtendedFloat &rhs) const |
bool | operator>= (const ExtendedFloat &rhs) const |
bool | operator>= (const double &rhs) const |
bool | operator> (const ExtendedFloat &rhs) const |
bool | operator> (const double &rhs) const |
double | log () const |
ExtendedFloat | abs () const |
std::tuple< int, double > | lround () const |
ExtendedFloat | exp () const |
Static Public Member Functions | |
static ExtendedFloat | denorm_mul (const ExtendedFloat &lhs, const ExtendedFloat &rhs) |
static ExtendedFloat | denorm_div (const ExtendedFloat &lhs, const ExtendedFloat &rhs) |
static ExtendedFloat | denorm_add (const ExtendedFloat &lhs, const ExtendedFloat &rhs) |
static ExtendedFloat | denorm_sub (const ExtendedFloat &lhs, const ExtendedFloat &rhs) |
static ExtendedFloat | denorm_sub (const ExtendedFloat &lhs, const double &rhs) |
static ExtendedFloat | denorm_pow (const ExtendedFloat &lhs, double exp) |
static ExtendedFloat | denorm_pow (const ExtendedFloat &lhs, int exp) |
static double | convert (const ExtendedFloat &ef) |
Static Public Attributes | |
static constexpr int | allowed_product_without_normalization = 2 |
static constexpr int | radix = std::numeric_limits<FloatType>::radix |
static const double | ln_radix |
static constexpr int | biggest_repr_radix_power = std::numeric_limits<FloatType>::max_exponent - 1 |
static constexpr int | biggest_normalized_radix_power |
static constexpr FloatType | biggest_normalized_value |
static constexpr int | smallest_repr_radix_power = std::numeric_limits<FloatType>::min_exponent + 1 |
static constexpr int | smallest_normalized_radix_power |
static constexpr FloatType | smallest_normalized_value |
static constexpr FloatType | normalize_big_factor = 1. / biggest_normalized_value |
static constexpr FloatType | normalize_small_factor = 1. / smallest_normalized_value |
Protected Member Functions | |
FloatType & | float_part () noexcept |
ExtType & | exponent_part () noexcept |
Protected Attributes | |
FloatType | f_ |
ExtType | exp_ |
Private Member Functions | |
operator double () const | |
Friends | |
template<typename Scalar , typename NullaryOp , bool has_nullary, bool has_unary, bool has_binary> | |
struct | Eigen::internal::nullary_wrapper |
Definition at line 37 of file ExtendedFloat.h.
using bpp::ExtendedFloat::ExtType = int |
Definition at line 43 of file ExtendedFloat.h.
using bpp::ExtendedFloat::FloatType = double |
Definition at line 42 of file ExtendedFloat.h.
|
inlineconstexprnoexcept |
Definition at line 82 of file ExtendedFloat.h.
Referenced by abs(), denorm_add(), denorm_pow(), denorm_sub(), exp(), and operator-().
|
inlinenoexcept |
Definition at line 85 of file ExtendedFloat.h.
|
inline |
Definition at line 357 of file ExtendedFloat.h.
References bpp::abs(), exponent_part(), ExtendedFloat(), and float_part().
Referenced by bpp::abs().
|
inlinestatic |
Definition at line 418 of file ExtendedFloat.h.
References exponent_part(), float_part(), and radix.
Referenced by lround(), operator>(), and operator>=().
|
inlinestatic |
Definition at line 142 of file ExtendedFloat.h.
References exponent_part(), ExtendedFloat(), float_part(), and radix.
Referenced by operator+().
|
inlinestatic |
Definition at line 137 of file ExtendedFloat.h.
References exponent_part(), and float_part().
Referenced by denorm_pow(), and operator/().
|
inlinestatic |
Definition at line 132 of file ExtendedFloat.h.
References exponent_part(), and float_part().
Referenced by bpp::SumOfLogarithms< F >::compute(), denorm_pow(), and operator*().
|
inlinestatic |
Definition at line 163 of file ExtendedFloat.h.
References exp(), exponent_part(), float_part(), bpp::pow(), and radix.
Referenced by denorm_pow(), and pow().
|
inlinestatic |
Definition at line 171 of file ExtendedFloat.h.
References denorm_div(), denorm_mul(), denorm_pow(), exp(), exponent_part(), ExtendedFloat(), float_part(), normalize(), and bpp::pow().
|
inlinestatic |
Definition at line 156 of file ExtendedFloat.h.
References exponent_part(), ExtendedFloat(), float_part(), and radix.
|
inlinestatic |
Definition at line 149 of file ExtendedFloat.h.
References exponent_part(), ExtendedFloat(), float_part(), and radix.
Referenced by operator-().
|
inline |
Definition at line 395 of file ExtendedFloat.h.
References exponent_part(), ExtendedFloat(), float_part(), ln_radix, bpp::pow(), and radix.
Referenced by denorm_pow(), bpp::exp(), and pow().
|
inlinenoexcept |
Definition at line 89 of file ExtendedFloat.h.
References exp_.
Referenced by abs(), bpp::SumOfLogarithms< F >::compute(), bpp::ExtendedFloatEigen< R, C, EigenType >::Constant(), bpp::convert(), convert(), denorm_add(), denorm_div(), denorm_mul(), bpp::ExtendedFloatEigen< R, C, EigenType >::denorm_mul(), denorm_pow(), denorm_sub(), exp(), bpp::numeric::hash(), bpp::numeric::inverse(), bpp::numeric::isinf(), log(), lround(), operator!=(), operator*(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator<(), bpp::operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), and bpp::to_string().
|
inlineprotectednoexcept |
Definition at line 428 of file ExtendedFloat.h.
References exp_.
|
inlinenoexcept |
Definition at line 88 of file ExtendedFloat.h.
References f_.
Referenced by abs(), bpp::SumOfLogarithms< F >::compute(), bpp::ExtendedFloatEigen< R, C, EigenType >::Constant(), bpp::convert(), convert(), denorm_add(), denorm_div(), denorm_mul(), bpp::ExtendedFloatEigen< R, C, EigenType >::denorm_mul(), denorm_pow(), denorm_sub(), exp(), bpp::numeric::hash(), bpp::numeric::inverse(), bpp::numeric::isinf(), log(), lround(), operator double(), operator!=(), operator*(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator<(), bpp::operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), and bpp::to_string().
|
inlineprotectednoexcept |
Definition at line 427 of file ExtendedFloat.h.
References f_.
|
inline |
Definition at line 352 of file ExtendedFloat.h.
References exponent_part(), float_part(), ln_radix, and bpp::log().
Referenced by bpp::SumOfLogarithms< F >::compute(), and bpp::log().
|
inline |
Definition at line 363 of file ExtendedFloat.h.
References biggest_normalized_radix_power, biggest_normalized_value, convert(), exponent_part(), float_part(), bpp::powi(), and radix.
Referenced by bpp::ExtendedFloatEigen< R, C, EigenType >::exp().
|
inlinenoexcept |
Definition at line 123 of file ExtendedFloat.h.
References normalize_big(), and normalize_small().
Referenced by bpp::SumOfLogarithms< F >::compute(), denorm_pow(), operator*(), operator*=(), operator+=(), operator-=(), and operator/=().
|
inlinenoexcept |
Definition at line 91 of file ExtendedFloat.h.
References bpp::abs(), biggest_normalized_radix_power, biggest_normalized_value, exp_, f_, and normalize_big_factor.
Referenced by normalize().
|
inline |
Definition at line 107 of file ExtendedFloat.h.
References bpp::abs(), exp_, f_, normalize_small_factor, smallest_normalized_radix_power, and smallest_normalized_value.
Referenced by bpp::SumOfLogarithms< F >::compute(), and normalize().
|
inlineprivate |
Definition at line 408 of file ExtendedFloat.h.
References float_part().
|
inline |
Definition at line 317 of file ExtendedFloat.h.
References exponent_part(), and float_part().
|
inline |
Definition at line 221 of file ExtendedFloat.h.
References denorm_mul().
|
inline |
Definition at line 229 of file ExtendedFloat.h.
References exponent_part(), float_part(), and normalize().
|
inline |
Definition at line 243 of file ExtendedFloat.h.
References exponent_part(), float_part(), and normalize().
|
inline |
Definition at line 199 of file ExtendedFloat.h.
References denorm_add().
|
inline |
Definition at line 259 of file ExtendedFloat.h.
References exponent_part(), float_part(), normalize(), and radix.
|
inline |
Definition at line 289 of file ExtendedFloat.h.
References exponent_part(), ExtendedFloat(), and float_part().
|
inline |
Definition at line 206 of file ExtendedFloat.h.
References denorm_sub().
|
inline |
Definition at line 214 of file ExtendedFloat.h.
References denorm_sub().
|
inline |
Definition at line 274 of file ExtendedFloat.h.
References exponent_part(), float_part(), normalize(), and radix.
|
inline |
Definition at line 236 of file ExtendedFloat.h.
References denorm_div().
|
inline |
Definition at line 251 of file ExtendedFloat.h.
References exponent_part(), float_part(), and normalize().
|
inline |
Definition at line 322 of file ExtendedFloat.h.
References exponent_part(), and float_part().
|
inline |
Definition at line 327 of file ExtendedFloat.h.
References exponent_part(), and float_part().
|
inline |
Definition at line 192 of file ExtendedFloat.h.
References exp_, exponent_part(), f_, and float_part().
|
inline |
Definition at line 312 of file ExtendedFloat.h.
References exponent_part(), and float_part().
|
inline |
Definition at line 347 of file ExtendedFloat.h.
References convert().
|
inline |
Definition at line 342 of file ExtendedFloat.h.
References exponent_part(), and float_part().
|
inline |
Definition at line 337 of file ExtendedFloat.h.
References convert().
|
inline |
Definition at line 332 of file ExtendedFloat.h.
References exponent_part(), and float_part().
|
inline |
Definition at line 294 of file ExtendedFloat.h.
References denorm_pow(), and exp().
Referenced by bpp::pow().
|
inline |
Definition at line 301 of file ExtendedFloat.h.
References denorm_pow(), and exp().
|
friend |
Definition at line 414 of file ExtendedFloat.h.
|
staticconstexpr |
Definition at line 46 of file ExtendedFloat.h.
|
staticconstexpr |
Definition at line 57 of file ExtendedFloat.h.
Referenced by lround(), normalize_big(), and bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_big().
|
staticconstexpr |
Definition at line 62 of file ExtendedFloat.h.
Referenced by lround(), normalize_big(), bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_big(), and bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_small().
|
staticconstexpr |
Definition at line 54 of file ExtendedFloat.h.
|
protected |
Definition at line 425 of file ExtendedFloat.h.
Referenced by exponent_part(), normalize_big(), normalize_small(), operator=(), and bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat::set_exponent_part().
|
protected |
Definition at line 424 of file ExtendedFloat.h.
Referenced by float_part(), normalize_big(), normalize_small(), operator=(), and bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat::set_float_part().
|
static |
Definition at line 51 of file ExtendedFloat.h.
Referenced by bpp::SumOfLogarithms< F >::compute(), exp(), bpp::ExtendedFloatEigen< R, C, EigenType >::exp(), log(), and bpp::ExtendedFloatEigen< R, C, EigenType >::log().
|
staticconstexpr |
Definition at line 77 of file ExtendedFloat.h.
Referenced by normalize_big(), and bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_big().
|
staticconstexpr |
Definition at line 78 of file ExtendedFloat.h.
Referenced by normalize_small(), and bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_small().
|
staticconstexpr |
Definition at line 49 of file ExtendedFloat.h.
Referenced by bpp::convert(), convert(), bpp::numeric::convert(), denorm_add(), bpp::ExtendedFloatEigen< R, C, EigenType >::denorm_add(), denorm_pow(), bpp::ExtendedFloatEigen< R, C, EigenType >::denorm_pow(), denorm_sub(), bpp::ExtendedFloatEigen< R, C, EigenType >::denorm_sub(), exp(), bpp::ExtendedFloatEigen< R, C, EigenType >::exp(), lround(), bpp::ExtendedFloatArrayWrapper< R, C >::operator+=(), operator+=(), bpp::ExtendedFloatNoAlias< DerivedEF >::operator+=(), bpp::ExtendedFloatEigen< R, C, EigenType >::operator+=(), operator-=(), bpp::ExtendedFloatNoAlias< DerivedEF >::operator-=(), bpp::ExtendedFloatEigen< R, C, EigenType >::operator-=(), bpp::ExtendedFloatRow< R, C, EigenType >::operator=(), and bpp::ExtendedFloatCol< R, C, EigenType >::operator=().
|
staticconstexpr |
Definition at line 69 of file ExtendedFloat.h.
Referenced by normalize_small(), and bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_small().
|
staticconstexpr |
Definition at line 73 of file ExtendedFloat.h.
Referenced by normalize_small(), and bpp::ExtendedFloatEigen< R, C, EigenType >::normalize_small().
|
staticconstexpr |
Definition at line 66 of file ExtendedFloat.h.