$treeview $search $mathjax
#include <stdair/basic/float_utils_google.hpp>
Public Types | |
typedef TypeWithSize< sizeof(RawType)> ::UInt | Bits |
Public Member Functions | |
FloatingPoint (const RawType &x) | |
const Bits & | bits () const |
Bits | exponent_bits () const |
Bits | fraction_bits () const |
Bits | sign_bit () const |
bool | is_nan () const |
bool | AlmostEquals (const FloatingPoint &rhs) const |
Static Public Member Functions | |
static RawType | ReinterpretBits (const Bits bits) |
static RawType | Infinity () |
Static Public Attributes | |
static const size_t | kBitCount = 8*sizeof(RawType) |
static const size_t | kFractionBitCount |
static const size_t | kExponentBitCount = kBitCount - 1 - kFractionBitCount |
static const Bits | kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1) |
static const Bits | kFractionBitMask |
static const Bits | kExponentBitMask = ~(kSignBitMask | kFractionBitMask) |
static const size_t | kMaxUlps = 4 |
Definition at line 117 of file float_utils_google.hpp.
typedef TypeWithSize<sizeof(RawType)>::UInt FloatingPoint< RawType >::Bits |
Definition at line 121 of file float_utils_google.hpp.
FloatingPoint< RawType >::FloatingPoint | ( | const RawType & | x | ) | [inline, explicit] |
Definition at line 165 of file float_utils_google.hpp.
static RawType FloatingPoint< RawType >::ReinterpretBits | ( | const Bits | bits | ) | [inline, static] |
Definition at line 172 of file float_utils_google.hpp.
Referenced by FloatingPoint< RawType >::Infinity().
static RawType FloatingPoint< RawType >::Infinity | ( | ) | [inline, static] |
Definition at line 179 of file float_utils_google.hpp.
References FloatingPoint< RawType >::kExponentBitMask, and FloatingPoint< RawType >::ReinterpretBits().
const Bits& FloatingPoint< RawType >::bits | ( | ) | const [inline] |
Definition at line 186 of file float_utils_google.hpp.
Bits FloatingPoint< RawType >::exponent_bits | ( | ) | const [inline] |
Definition at line 189 of file float_utils_google.hpp.
References FloatingPoint< RawType >::kExponentBitMask.
Referenced by FloatingPoint< RawType >::is_nan().
Bits FloatingPoint< RawType >::fraction_bits | ( | ) | const [inline] |
Definition at line 192 of file float_utils_google.hpp.
References FloatingPoint< RawType >::kFractionBitMask.
Referenced by FloatingPoint< RawType >::is_nan().
Bits FloatingPoint< RawType >::sign_bit | ( | ) | const [inline] |
Definition at line 195 of file float_utils_google.hpp.
References FloatingPoint< RawType >::kSignBitMask.
bool FloatingPoint< RawType >::is_nan | ( | ) | const [inline] |
Definition at line 198 of file float_utils_google.hpp.
References FloatingPoint< RawType >::exponent_bits(), FloatingPoint< RawType >::fraction_bits(), and FloatingPoint< RawType >::kExponentBitMask.
Referenced by FloatingPoint< RawType >::AlmostEquals().
bool FloatingPoint< RawType >::AlmostEquals | ( | const FloatingPoint< RawType > & | rhs | ) | const [inline] |
Definition at line 210 of file float_utils_google.hpp.
References FloatingPoint< RawType >::is_nan(), and FloatingPoint< RawType >::kMaxUlps.
const size_t FloatingPoint< RawType >::kBitCount = 8*sizeof(RawType) [static] |
Definition at line 126 of file float_utils_google.hpp.
const size_t FloatingPoint< RawType >::kFractionBitCount [static] |
std::numeric_limits<RawType>::digits - 1
Definition at line 129 of file float_utils_google.hpp.
const size_t FloatingPoint< RawType >::kExponentBitCount = kBitCount - 1 - kFractionBitCount [static] |
Definition at line 133 of file float_utils_google.hpp.
const Bits FloatingPoint< RawType >::kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1) [static] |
Definition at line 136 of file float_utils_google.hpp.
Referenced by FloatingPoint< RawType >::sign_bit().
const Bits FloatingPoint< RawType >::kFractionBitMask [static] |
~static_cast<Bits>(0) >> (kExponentBitCount + 1)
Definition at line 139 of file float_utils_google.hpp.
Referenced by FloatingPoint< RawType >::fraction_bits().
const Bits FloatingPoint< RawType >::kExponentBitMask = ~(kSignBitMask | kFractionBitMask) [static] |
Definition at line 143 of file float_utils_google.hpp.
Referenced by FloatingPoint< RawType >::exponent_bits(), FloatingPoint< RawType >::Infinity(), and FloatingPoint< RawType >::is_nan().
const size_t FloatingPoint< RawType >::kMaxUlps = 4 [static] |
Definition at line 157 of file float_utils_google.hpp.
Referenced by FloatingPoint< RawType >::AlmostEquals().