bpp-phyl3  3.0.0
bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat Class Reference

#include <Bpp/Phyl/Likelihood/DataFlow/ExtendedFloatEigen.h>

+ Inheritance diagram for bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat:
+ Collaboration diagram for bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat:

Public Types

using FloatType = double
 
using ExtType = int
 

Public Member Functions

 OwnedExtendedFloat (const ExtendedFloatEigen &eigen)
 
const ExtendedFloat::ExtTypeexponent_part () const
 
const FloatTypefloat_part () const noexcept
 
bool normalize_big () noexcept
 
bool normalize_small ()
 
void normalize () noexcept
 
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 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
 
ExtendedFloatoperator*= (const ExtendedFloat &rhs)
 
ExtendedFloatoperator/= (const ExtendedFloat &rhs)
 
ExtendedFloatoperator+= (const ExtendedFloat &rhs)
 
ExtendedFloatoperator-= (const ExtendedFloat &rhs)
 
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

FloatTypefloat_part () noexcept
 
ExtTypeexponent_part () noexcept
 

Protected Attributes

FloatType f_
 
ExtType exp_
 

Private Member Functions

void set_float_part (double x)
 
void set_exponent_part (ExtendedFloat::ExtType x)
 
 operator double () const
 

Private Attributes

const ExtendedFloatEigeneigen_
 

Friends

class ExtendedFloatEigen
 

Detailed Description

template<int R, int C, template< int R2, int C2 > class EigenType>
class bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat

Definition at line 89 of file ExtendedFloatEigen.h.

Member Typedef Documentation

◆ ExtType

using bpp::ExtendedFloat::ExtType = int
inherited

Definition at line 43 of file ExtendedFloat.h.

◆ FloatType

using bpp::ExtendedFloat::FloatType = double
inherited

Definition at line 42 of file ExtendedFloat.h.

Constructor & Destructor Documentation

◆ OwnedExtendedFloat()

template<int R, int C, template< int R2, int C2 > class EigenType>
bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat::OwnedExtendedFloat ( const ExtendedFloatEigen eigen)
inline

Definition at line 104 of file ExtendedFloatEigen.h.

Member Function Documentation

◆ abs()

ExtendedFloat bpp::ExtendedFloat::abs ( ) const
inlineinherited

◆ convert()

static double bpp::ExtendedFloat::convert ( const ExtendedFloat ef)
inlinestaticinherited

◆ denorm_add()

static ExtendedFloat bpp::ExtendedFloat::denorm_add ( const ExtendedFloat lhs,
const ExtendedFloat rhs 
)
inlinestaticinherited

◆ denorm_div()

static ExtendedFloat bpp::ExtendedFloat::denorm_div ( const ExtendedFloat lhs,
const ExtendedFloat rhs 
)
inlinestaticinherited

◆ denorm_mul()

static ExtendedFloat bpp::ExtendedFloat::denorm_mul ( const ExtendedFloat lhs,
const ExtendedFloat rhs 
)
inlinestaticinherited

◆ denorm_pow() [1/2]

static ExtendedFloat bpp::ExtendedFloat::denorm_pow ( const ExtendedFloat lhs,
double  exp 
)
inlinestaticinherited

◆ denorm_pow() [2/2]

◆ denorm_sub() [1/2]

static ExtendedFloat bpp::ExtendedFloat::denorm_sub ( const ExtendedFloat lhs,
const double &  rhs 
)
inlinestaticinherited

◆ denorm_sub() [2/2]

static ExtendedFloat bpp::ExtendedFloat::denorm_sub ( const ExtendedFloat lhs,
const ExtendedFloat rhs 
)
inlinestaticinherited

◆ exp()

◆ exponent_part() [1/2]

template<int R, int C, template< int R2, int C2 > class EigenType>
const ExtendedFloat::ExtType& bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat::exponent_part ( ) const
inline

◆ exponent_part() [2/2]

ExtType& bpp::ExtendedFloat::exponent_part ( )
inlineprotectednoexceptinherited

Definition at line 428 of file ExtendedFloat.h.

References bpp::ExtendedFloat::exp_.

◆ float_part() [1/2]

◆ float_part() [2/2]

FloatType& bpp::ExtendedFloat::float_part ( )
inlineprotectednoexceptinherited

Definition at line 427 of file ExtendedFloat.h.

References bpp::ExtendedFloat::f_.

◆ log()

double bpp::ExtendedFloat::log ( ) const
inlineinherited

◆ lround()

◆ normalize()

◆ normalize_big()

◆ normalize_small()

◆ operator double()

bpp::ExtendedFloat::operator double ( ) const
inlineprivateinherited

Definition at line 408 of file ExtendedFloat.h.

References bpp::ExtendedFloat::float_part().

◆ operator!=()

bool bpp::ExtendedFloat::operator!= ( const ExtendedFloat rhs) const
inlineinherited

◆ operator*() [1/2]

ExtendedFloat bpp::ExtendedFloat::operator* ( const ExtendedFloat rhs) const
inlineinherited

Definition at line 221 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_mul().

◆ operator*() [2/2]

template<typename F , typename = typename std::enable_if<std::is_arithmetic<F>::value>::type>
ExtendedFloat bpp::ExtendedFloat::operator* ( const F &  rhs) const
inlineinherited

◆ operator*=()

ExtendedFloat& bpp::ExtendedFloat::operator*= ( const ExtendedFloat rhs)
inlineinherited

◆ operator+()

ExtendedFloat bpp::ExtendedFloat::operator+ ( const ExtendedFloat rhs) const
inlineinherited

Definition at line 199 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_add().

◆ operator+=()

ExtendedFloat& bpp::ExtendedFloat::operator+= ( const ExtendedFloat rhs)
inlineinherited

◆ operator-() [1/3]

ExtendedFloat bpp::ExtendedFloat::operator- ( ) const
inlineinherited

◆ operator-() [2/3]

ExtendedFloat bpp::ExtendedFloat::operator- ( const ExtendedFloat rhs) const
inlineinherited

Definition at line 206 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_sub().

◆ operator-() [3/3]

template<typename F , typename = typename std::enable_if<std::is_arithmetic<F>::value>::type>
ExtendedFloat bpp::ExtendedFloat::operator- ( const F &  rhs) const
inlineinherited

Definition at line 214 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_sub().

◆ operator-=()

ExtendedFloat& bpp::ExtendedFloat::operator-= ( const ExtendedFloat rhs)
inlineinherited

◆ operator/()

ExtendedFloat bpp::ExtendedFloat::operator/ ( const ExtendedFloat rhs) const
inlineinherited

Definition at line 236 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_div().

◆ operator/=()

ExtendedFloat& bpp::ExtendedFloat::operator/= ( const ExtendedFloat rhs)
inlineinherited

◆ operator<()

bool bpp::ExtendedFloat::operator< ( const ExtendedFloat rhs) const
inlineinherited

◆ operator<=()

bool bpp::ExtendedFloat::operator<= ( const ExtendedFloat rhs) const
inlineinherited

◆ operator==()

bool bpp::ExtendedFloat::operator== ( const ExtendedFloat rhs) const
inlineinherited

◆ operator>() [1/2]

bool bpp::ExtendedFloat::operator> ( const double &  rhs) const
inlineinherited

Definition at line 347 of file ExtendedFloat.h.

References bpp::ExtendedFloat::convert().

◆ operator>() [2/2]

bool bpp::ExtendedFloat::operator> ( const ExtendedFloat rhs) const
inlineinherited

◆ operator>=() [1/2]

bool bpp::ExtendedFloat::operator>= ( const double &  rhs) const
inlineinherited

Definition at line 337 of file ExtendedFloat.h.

References bpp::ExtendedFloat::convert().

◆ operator>=() [2/2]

bool bpp::ExtendedFloat::operator>= ( const ExtendedFloat rhs) const
inlineinherited

◆ pow() [1/2]

ExtendedFloat bpp::ExtendedFloat::pow ( double  exp) const
inlineinherited

Definition at line 294 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_pow(), and bpp::ExtendedFloat::exp().

Referenced by bpp::pow().

◆ pow() [2/2]

ExtendedFloat bpp::ExtendedFloat::pow ( int  exp) const
inlineinherited

Definition at line 301 of file ExtendedFloat.h.

References bpp::ExtendedFloat::denorm_pow(), and bpp::ExtendedFloat::exp().

◆ set_exponent_part()

◆ set_float_part()

template<int R, int C, template< int R2, int C2 > class EigenType>
void bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat::set_float_part ( double  x)
inlineprivate

Friends And Related Function Documentation

◆ ExtendedFloatEigen

template<int R, int C, template< int R2, int C2 > class EigenType>
friend class ExtendedFloatEigen
friend

Definition at line 113 of file ExtendedFloatEigen.h.

Member Data Documentation

◆ allowed_product_without_normalization

constexpr int bpp::ExtendedFloat::allowed_product_without_normalization = 2
staticconstexprinherited

Definition at line 46 of file ExtendedFloat.h.

◆ biggest_normalized_radix_power

constexpr int bpp::ExtendedFloat::biggest_normalized_radix_power
staticconstexprinherited

◆ biggest_normalized_value

constexpr FloatType bpp::ExtendedFloat::biggest_normalized_value
staticconstexprinherited

◆ biggest_repr_radix_power

constexpr int bpp::ExtendedFloat::biggest_repr_radix_power = std::numeric_limits<FloatType>::max_exponent - 1
staticconstexprinherited

Definition at line 54 of file ExtendedFloat.h.

◆ eigen_

template<int R, int C, template< int R2, int C2 > class EigenType>
const ExtendedFloatEigen& bpp::ExtendedFloatEigen< R, C, EigenType >::OwnedExtendedFloat::eigen_
private

◆ exp_

◆ f_

◆ ln_radix

◆ normalize_big_factor

constexpr FloatType bpp::ExtendedFloat::normalize_big_factor = 1. / biggest_normalized_value
staticconstexprinherited

◆ normalize_small_factor

constexpr FloatType bpp::ExtendedFloat::normalize_small_factor = 1. / smallest_normalized_value
staticconstexprinherited

◆ radix

◆ smallest_normalized_radix_power

constexpr int bpp::ExtendedFloat::smallest_normalized_radix_power
staticconstexprinherited

◆ smallest_normalized_value

constexpr FloatType bpp::ExtendedFloat::smallest_normalized_value
staticconstexprinherited

◆ smallest_repr_radix_power

constexpr int bpp::ExtendedFloat::smallest_repr_radix_power = std::numeric_limits<FloatType>::min_exponent + 1
staticconstexprinherited

Definition at line 66 of file ExtendedFloat.h.


The documentation for this class was generated from the following file: