Elements
6.2
A C++ base framework for the Euclid Software.
|
Go to the documentation of this file.
49 a_int =
static_cast<int32_t
>(0x80000000 -
static_cast<uint32_t
>(a_int));
56 b_int =
static_cast<int32_t
>(0x80000000 -
static_cast<uint32_t
>(b_int));
58 int32_t int_diff = abs(a_int - b_int);
59 if (int_diff <= max_ulps && -max_ulps <= int_diff) {
76 a_int =
static_cast<int64_t
>(0x8000000000000000LL -
static_cast<uint64_t
>(a_int));
83 b_int =
static_cast<int64_t
>(0x8000000000000000LL -
static_cast<uint64_t
>(b_int));
85 int64_t int_diff = abs(a_int - b_int);
86 if (int_diff <= max_ulps && -max_ulps <= int_diff) {
template bool realBitWiseEqual< double >(const double &left, const double &right)
bool almostEqual2sComplement(ELEMENTS_UNUSED const FloatType &a, ELEMENTS_UNUSED const FloatType &b, ELEMENTS_UNUSED const std::size_t &max_ulps=0)
template bool realBitWiseEqual< float >(const float &left, const float &right)
const ELEMENTS_API double DBL_DEFAULT_TEST_TOLERANCE
Double precision float default test tolerance.
const ELEMENTS_API double FLT_DEFAULT_TEST_TOLERANCE
Single precision float default test tolerance.
Floating point comparison implementations.