|
Gromacs
2026.0-dev-20251119-5f0a571d
|
Functions | |
Helper functions for computing floating-point differences | |
These routines are used to initialize FloatingPointDifference. They peek into some internal types from Google Test (gtest-internal.h), and duplicate some other functionality from there, but that is likely a better alternative than just copying all that code here. | |
| template<typename FloatType > | |
| FloatingPoint< FloatType >::Bits | floatingPointToBiasedInteger (const FloatingPoint< FloatType > &value) |
| Computes biased integer representation for a floating-point value. More... | |
| template<typename FloatType > | |
| uint64_t | calculateUlpDifference (const FloatingPoint< FloatType > &value1, const FloatingPoint< FloatType > &value2) |
| Computes the magnitude of the difference in ULPs between two numbers, treating also values of different sign. | |
| template<typename FloatType > | |
| void | initDifference (FloatType raw1, FloatType raw2, double *absoluteDifference, uint64_t *ulpDifference, bool *bSignDifference) |
| Helper to implement the constructors for FloatingPointDifference. | |
| template<typename FloatType > | |
| uint64_t | relativeToleranceToUlp (FloatType tolerance) |
| Converts a relative tolerance into an ULP difference. | |
Variables | |
| bool | g_showExpectedExceptions = false |
| Whether to print the message from expected exceptions. | |
1.8.5