#include <ts_gtest.h>
Public Types | |
typedef TypeWithSize< sizeof(RawType)> ::UInt | Bits |
Public Member Functions | |
FloatingPoint (const RawType &x) | |
const Bits & | bits () 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 () |
Static Public Member Functions | |
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 |
typedef TypeWithSize<sizeof(RawType)>::UInt testing::internal::FloatingPoint< RawType >::Bits |
|
explicit |
|
static |
|
static |
|
static |
const Bits& testing::internal::FloatingPoint< RawType >::bits | ( | ) | const |
Bits testing::internal::FloatingPoint< RawType >::exponent_bits | ( | ) | const |
Bits testing::internal::FloatingPoint< RawType >::fraction_bits | ( | ) | const |
Bits testing::internal::FloatingPoint< RawType >::sign_bit | ( | ) | const |
bool testing::internal::FloatingPoint< RawType >::is_nan | ( | ) | const |
bool testing::internal::FloatingPoint< RawType >::AlmostEquals | ( | const FloatingPoint< RawType > & | rhs | ) | const |
float testing::internal::FloatingPoint< float >::Max | ( | ) |
double testing::internal::FloatingPoint< double >::Max | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |