StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FloatingPoint< RawType > Class Template Reference

#include <stdair/basic/float_utils_google.hpp>

List of all members.

Public Types

typedef TypeWithSize< sizeof(RawType)>
::UInt 
Bits

Public Member Functions

 FloatingPoint (const RawType &x)
const Bitsbits () 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

Detailed Description

template<typename RawType>
class FloatingPoint< RawType >

Definition at line 117 of file float_utils_google.hpp.


Member Typedef Documentation

template<typename RawType>
typedef TypeWithSize<sizeof(RawType)>::UInt FloatingPoint< RawType >::Bits

Definition at line 121 of file float_utils_google.hpp.


Constructor & Destructor Documentation

template<typename RawType>
FloatingPoint< RawType >::FloatingPoint ( const RawType &  x)
inlineexplicit

Definition at line 165 of file float_utils_google.hpp.


Member Function Documentation

template<typename RawType>
static RawType FloatingPoint< RawType >::ReinterpretBits ( const Bits  bits)
inlinestatic
template<typename RawType>
static RawType FloatingPoint< RawType >::Infinity ( )
inlinestatic
template<typename RawType>
const Bits& FloatingPoint< RawType >::bits ( ) const
inline

Definition at line 186 of file float_utils_google.hpp.

Referenced by FloatingPoint< RawType >::ReinterpretBits().

template<typename RawType>
Bits FloatingPoint< RawType >::exponent_bits ( ) const
inline
template<typename RawType>
Bits FloatingPoint< RawType >::fraction_bits ( ) const
inline
template<typename RawType>
Bits FloatingPoint< RawType >::sign_bit ( ) const
inline

Definition at line 195 of file float_utils_google.hpp.

References FloatingPoint< RawType >::kSignBitMask.

template<typename RawType>
bool FloatingPoint< RawType >::is_nan ( ) const
inline
template<typename RawType>
bool FloatingPoint< RawType >::AlmostEquals ( const FloatingPoint< RawType > &  rhs) const
inline

Member Data Documentation

template<typename RawType>
const size_t FloatingPoint< RawType >::kBitCount = 8*sizeof(RawType)
static

Definition at line 126 of file float_utils_google.hpp.

template<typename RawType>
const size_t FloatingPoint< RawType >::kFractionBitCount
static
Initial value:
std::numeric_limits<RawType>::digits - 1

Definition at line 129 of file float_utils_google.hpp.

template<typename RawType>
const size_t FloatingPoint< RawType >::kExponentBitCount = kBitCount - 1 - kFractionBitCount
static

Definition at line 133 of file float_utils_google.hpp.

template<typename RawType>
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().

template<typename RawType>
const Bits FloatingPoint< RawType >::kFractionBitMask
static
Initial value:
~static_cast<Bits>(0) >> (kExponentBitCount + 1)

Definition at line 139 of file float_utils_google.hpp.

Referenced by FloatingPoint< RawType >::fraction_bits().

template<typename RawType>
const Bits FloatingPoint< RawType >::kExponentBitMask = ~(kSignBitMask | kFractionBitMask)
static
template<typename RawType>
const size_t FloatingPoint< RawType >::kMaxUlps = 4
static

Definition at line 157 of file float_utils_google.hpp.

Referenced by FloatingPoint< RawType >::AlmostEquals().


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