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

Public Member Functions

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

Static Public Member Functions

static RawType Infinity ()
 
static RawType Infinity ()
 
static RawType Infinity ()
 
static RawType Infinity ()
 
static RawType Infinity ()
 
static RawType Infinity ()
 
static RawType Max ()
 
static RawType Max ()
 
static RawType Max ()
 
static RawType Max ()
 
static RawType Max ()
 
static RawType Max ()
 
static RawType ReinterpretBits (const Bits bits)
 
static RawType ReinterpretBits (const Bits bits)
 
static RawType ReinterpretBits (const Bits bits)
 
static RawType ReinterpretBits (const Bits bits)
 
static RawType ReinterpretBits (const Bits bits)
 
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 uint32_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 DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 
static Bits DistanceBetweenSignAndMagnitudeNumbers (const Bits &sam1, const Bits &sam2)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 
static Bits SignAndMagnitudeToBiased (const Bits &sam)
 

Private Attributes

FloatingPointUnion u_
 

Detailed Description

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

Definition at line 238 of file bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h.

Member Typedef Documentation

◆ Bits [1/6]

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

◆ Bits [2/6]

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

◆ Bits [3/6]

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

◆ Bits [4/6]

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

◆ Bits [5/6]

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

◆ Bits [6/6]

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

Definition at line 8001 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

Constructor & Destructor Documentation

◆ FloatingPoint() [1/6]

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

◆ FloatingPoint() [2/6]

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

◆ FloatingPoint() [3/6]

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

◆ FloatingPoint() [4/6]

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

Definition at line 8045 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ FloatingPoint() [5/6]

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

◆ FloatingPoint() [6/6]

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

Member Function Documentation

◆ AlmostEquals() [1/6]

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

◆ AlmostEquals() [2/6]

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

◆ AlmostEquals() [3/6]

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

◆ AlmostEquals() [4/6]

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

◆ AlmostEquals() [5/6]

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

◆ AlmostEquals() [6/6]

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

Definition at line 8093 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ bits() [1/6]

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

◆ bits() [2/6]

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

◆ bits() [3/6]

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

◆ bits() [4/6]

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

◆ bits() [5/6]

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

◆ bits() [6/6]

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

Definition at line 8069 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ DistanceBetweenSignAndMagnitudeNumbers() [1/6]

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

◆ DistanceBetweenSignAndMagnitudeNumbers() [2/6]

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

◆ DistanceBetweenSignAndMagnitudeNumbers() [3/6]

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

◆ DistanceBetweenSignAndMagnitudeNumbers() [4/6]

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

◆ DistanceBetweenSignAndMagnitudeNumbers() [5/6]

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

◆ DistanceBetweenSignAndMagnitudeNumbers() [6/6]

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

Definition at line 8136 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ exponent_bits() [1/6]

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

◆ exponent_bits() [2/6]

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

◆ exponent_bits() [3/6]

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

◆ exponent_bits() [4/6]

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

◆ exponent_bits() [5/6]

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

◆ exponent_bits() [6/6]

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

Definition at line 8072 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ fraction_bits() [1/6]

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

◆ fraction_bits() [2/6]

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

◆ fraction_bits() [3/6]

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

◆ fraction_bits() [4/6]

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

◆ fraction_bits() [5/6]

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

◆ fraction_bits() [6/6]

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

Definition at line 8075 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ Infinity() [1/6]

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

◆ Infinity() [2/6]

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

◆ Infinity() [3/6]

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

◆ Infinity() [4/6]

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

◆ Infinity() [5/6]

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

◆ Infinity() [6/6]

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

Definition at line 8059 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ is_nan() [1/6]

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

◆ is_nan() [2/6]

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

◆ is_nan() [3/6]

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

◆ is_nan() [4/6]

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

◆ is_nan() [5/6]

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

◆ is_nan() [6/6]

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

Definition at line 8081 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ Max() [1/18]

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

◆ Max() [2/18]

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

◆ Max() [3/18]

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

◆ Max() [4/18]

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

◆ Max() [5/18]

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

◆ Max() [6/18]

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

◆ Max() [7/18]

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

◆ Max() [8/18]

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

◆ Max() [9/18]

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

◆ Max() [10/18]

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

◆ Max() [11/18]

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

◆ Max() [12/18]

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

◆ Max() [13/18]

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

◆ Max() [14/18]

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

◆ Max() [15/18]

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

◆ Max() [16/18]

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

◆ Max() [17/18]

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

Definition at line 8149 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ Max() [18/18]

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

Definition at line 8151 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ ReinterpretBits() [1/6]

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

◆ ReinterpretBits() [2/6]

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

◆ ReinterpretBits() [3/6]

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

◆ ReinterpretBits() [4/6]

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

◆ ReinterpretBits() [5/6]

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

◆ ReinterpretBits() [6/6]

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

Definition at line 8052 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ sign_bit() [1/6]

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

◆ sign_bit() [2/6]

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

◆ sign_bit() [3/6]

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

◆ sign_bit() [4/6]

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

◆ sign_bit() [5/6]

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

◆ sign_bit() [6/6]

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

Definition at line 8078 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

◆ SignAndMagnitudeToBiased() [1/6]

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

◆ SignAndMagnitudeToBiased() [2/6]

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

◆ SignAndMagnitudeToBiased() [3/6]

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

◆ SignAndMagnitudeToBiased() [4/6]

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

◆ SignAndMagnitudeToBiased() [5/6]

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

◆ SignAndMagnitudeToBiased() [6/6]

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

Definition at line 8124 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

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

Definition at line 250 of file bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h.

◆ kFractionBitMask

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

Definition at line 260 of file bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h.

◆ kMaxUlps [1/2]

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

◆ kMaxUlps [2/2]

template<typename RawType >
const uint32_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 files:
testing::internal::FloatingPoint::kExponentBitCount
static const size_t kExponentBitCount
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h:254


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:49