Monero
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
testing::internal::FloatingPoint< RawType > Class Template Reference

#include <gtest-internal.h>

Collaboration diagram for testing::internal::FloatingPoint< RawType >:
Collaboration graph
[legend]

Classes

union  FloatingPointUnion
 

Public Types

typedef TypeWithSize< sizeof(RawType)>::UInt Bits
 
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
 
 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
 
template<>
float Max ()
 
template<>
double Max ()
 
template<>
float Max ()
 
template<>
double Max ()
 

Static Public Member Functions

static RawType ReinterpretBits (const Bits bits)
 
static RawType Infinity ()
 
static RawType Max ()
 
static RawType ReinterpretBits (const Bits bits)
 
static RawType Infinity ()
 
static RawType Max ()
 

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
 

Static Private Member Functions

static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 

Private Attributes

FloatingPointUnion u_
 

Member Typedef Documentation

◆ Bits [1/2]

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

◆ Bits [2/2]

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

Constructor & Destructor Documentation

◆ FloatingPoint() [1/2]

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

◆ FloatingPoint() [2/2]

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

Member Function Documentation

◆ AlmostEquals() [1/2]

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

◆ AlmostEquals() [2/2]

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

◆ bits() [1/2]

template<typename RawType>
const Bits& testing::internal::FloatingPoint< RawType >::bits ( ) const
inline

◆ bits() [2/2]

template<typename RawType>
const Bits& testing::internal::FloatingPoint< RawType >::bits ( ) const
inline

◆ DistanceBetweenSignAndMagnitudeNumbers() [1/2]

template<typename RawType>
static Bits testing::internal::FloatingPoint< RawType >::DistanceBetweenSignAndMagnitudeNumbers ( const Bits sam1,
const Bits sam2 
)
inlinestaticprivate

◆ DistanceBetweenSignAndMagnitudeNumbers() [2/2]

template<typename RawType>
static Bits testing::internal::FloatingPoint< RawType >::DistanceBetweenSignAndMagnitudeNumbers ( const Bits sam1,
const Bits sam2 
)
inlinestaticprivate

◆ exponent_bits() [1/2]

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::exponent_bits ( ) const
inline

◆ exponent_bits() [2/2]

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::exponent_bits ( ) const
inline

◆ fraction_bits() [1/2]

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::fraction_bits ( ) const
inline

◆ fraction_bits() [2/2]

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::fraction_bits ( ) const
inline

◆ Infinity() [1/2]

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::Infinity ( )
inlinestatic

◆ Infinity() [2/2]

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::Infinity ( )
inlinestatic

◆ is_nan() [1/2]

template<typename RawType>
bool testing::internal::FloatingPoint< RawType >::is_nan ( ) const
inline

◆ is_nan() [2/2]

template<typename RawType>
bool testing::internal::FloatingPoint< RawType >::is_nan ( ) const
inline

◆ Max() [1/6]

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::Max ( )
static

◆ Max() [2/6]

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::Max ( )
static

◆ Max() [3/6]

template<>
float testing::internal::FloatingPoint< float >::Max ( )
inline

◆ Max() [4/6]

template<>
float testing::internal::FloatingPoint< float >::Max ( )
inline

◆ Max() [5/6]

template<>
double testing::internal::FloatingPoint< double >::Max ( )
inline

◆ Max() [6/6]

template<>
double testing::internal::FloatingPoint< double >::Max ( )
inline

◆ ReinterpretBits() [1/2]

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::ReinterpretBits ( const Bits  bits)
inlinestatic

◆ ReinterpretBits() [2/2]

template<typename RawType>
static RawType testing::internal::FloatingPoint< RawType >::ReinterpretBits ( const Bits  bits)
inlinestatic

◆ sign_bit() [1/2]

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::sign_bit ( ) const
inline

◆ sign_bit() [2/2]

template<typename RawType>
Bits testing::internal::FloatingPoint< RawType >::sign_bit ( ) const
inline

◆ SignAndMagnitudeToBiased() [1/2]

template<typename RawType>
static Bits testing::internal::FloatingPoint< RawType >::SignAndMagnitudeToBiased ( const Bits sam)
inlinestaticprivate

◆ SignAndMagnitudeToBiased() [2/2]

template<typename RawType>
static Bits testing::internal::FloatingPoint< RawType >::SignAndMagnitudeToBiased ( const Bits sam)
inlinestaticprivate

Member Data Documentation

◆ kBitCount

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

◆ kExponentBitCount

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

◆ kExponentBitMask

template<typename RawType>
static const Bits testing::internal::FloatingPoint< RawType >::kExponentBitMask = ~(kSignBitMask | kFractionBitMask)
static

◆ kFractionBitCount

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

◆ kFractionBitMask

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

◆ kMaxUlps

template<typename RawType>
static const size_t testing::internal::FloatingPoint< RawType >::kMaxUlps = 4
static

◆ kSignBitMask

template<typename RawType>
static const Bits testing::internal::FloatingPoint< RawType >::kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1)
static

◆ u_

template<typename RawType>
FloatingPointUnion testing::internal::FloatingPoint< RawType >::u_
private

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