Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
testing::internal::FloatingPoint< RawType > Class Template Reference

#include <ts_gtest.h>

List of all members.

Classes

union  FloatingPointUnion

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

template<typename RawType>
class testing::internal::FloatingPoint< RawType >


Member Typedef Documentation

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

Constructor & Destructor Documentation

template<typename RawType>
testing::internal::FloatingPoint< RawType >::FloatingPoint ( const RawType &  x) [explicit]

Member Function Documentation

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::ReinterpretBits ( const Bits  bits) [static]
template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::Infinity ( ) [static]
template<typename RawType>
const Bits& testing::internal::FloatingPoint< RawType >::bits ( ) const
template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::exponent_bits ( ) const
template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::fraction_bits ( ) const
template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::sign_bit ( ) const
template<typename RawType>
bool testing::internal::FloatingPoint< RawType >::is_nan ( ) const
template<typename RawType>
bool testing::internal::FloatingPoint< RawType >::AlmostEquals ( const FloatingPoint< RawType > &  rhs) const

Member Data Documentation

template<typename RawType>
const size_t testing::internal::FloatingPoint< RawType >::kBitCount = 8*sizeof(RawType) [static]
template<typename RawType>
const size_t testing::internal::FloatingPoint< RawType >::kFractionBitCount [static]
Initial value:
    std::numeric_limits<RawType>::digits - 1
template<typename RawType>
const size_t testing::internal::FloatingPoint< RawType >::kExponentBitCount = kBitCount - 1 - kFractionBitCount [static]
template<typename RawType>
const Bits testing::internal::FloatingPoint< RawType >::kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1) [static]
template<typename RawType>
const Bits testing::internal::FloatingPoint< RawType >::kFractionBitMask [static]
Initial value:
    ~static_cast<Bits>(0) >> (kExponentBitCount + 1)
template<typename RawType>
const Bits testing::internal::FloatingPoint< RawType >::kExponentBitMask = ~(kSignBitMask | kFractionBitMask) [static]
template<typename RawType>
const size_t testing::internal::FloatingPoint< RawType >::kMaxUlps = 4 [static]

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