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>

Classes

union  FloatingPointUnion
 

Public Types

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

Public Member Functions

bool AlmostEquals (const FloatingPoint &rhs) const
 
const Bitsbits () const
 
Bits exponent_bits () const
 
 FloatingPoint (const RawType &x)
 
Bits fraction_bits () const
 
bool is_nan () const
 
float Max ()
 
double Max ()
 
Bits sign_bit () const
 

Static Public Member Functions

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

Static Public Attributes

static const size_t kBitCount = 8*sizeof(RawType)
 
static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount
 
static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask)
 
static const size_t kFractionBitCount
 
static const Bits kFractionBitMask
 
static const size_t kMaxUlps = 4
 
static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1)
 

Static Private Member Functions

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

Private Attributes

FloatingPointUnion u_
 

Detailed Description

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

Definition at line 232 of file gtest-internal.h.

Member Typedef Documentation

◆ Bits

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

Definition at line 236 of file gtest-internal.h.

Constructor & Destructor Documentation

◆ FloatingPoint()

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

Definition at line 280 of file gtest-internal.h.

Member Function Documentation

◆ AlmostEquals()

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

Definition at line 328 of file gtest-internal.h.

◆ bits()

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

Definition at line 304 of file gtest-internal.h.

◆ DistanceBetweenSignAndMagnitudeNumbers()

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

Definition at line 371 of file gtest-internal.h.

◆ exponent_bits()

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

Definition at line 307 of file gtest-internal.h.

◆ fraction_bits()

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

Definition at line 310 of file gtest-internal.h.

◆ Infinity()

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

Definition at line 294 of file gtest-internal.h.

◆ is_nan()

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

Definition at line 316 of file gtest-internal.h.

◆ Max() [1/3]

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

◆ Max() [2/3]

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

Definition at line 384 of file gtest-internal.h.

◆ Max() [3/3]

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

Definition at line 386 of file gtest-internal.h.

◆ ReinterpretBits()

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

Definition at line 287 of file gtest-internal.h.

◆ sign_bit()

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

Definition at line 313 of file gtest-internal.h.

◆ SignAndMagnitudeToBiased()

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

Definition at line 359 of file gtest-internal.h.

Member Data Documentation

◆ kBitCount

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

Definition at line 241 of file gtest-internal.h.

◆ kExponentBitCount

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

Definition at line 248 of file gtest-internal.h.

◆ kExponentBitMask

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

Definition at line 258 of file gtest-internal.h.

◆ kFractionBitCount

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

Definition at line 244 of file gtest-internal.h.

◆ kFractionBitMask

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

Definition at line 254 of file gtest-internal.h.

◆ kMaxUlps

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

Definition at line 272 of file gtest-internal.h.

◆ kSignBitMask

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

Definition at line 251 of file gtest-internal.h.

◆ u_

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

Definition at line 378 of file gtest-internal.h.


The documentation for this class was generated from the following file:
testing::internal::FloatingPoint::kExponentBitCount
static const size_t kExponentBitCount
Definition: gtest-internal.h:248


fcl
Author(s):
autogenerated on Wed Feb 17 2021 03:40:11