| 11532 | |
| 11533 | template <typename FP> |
| 11534 | FP step(FP start, FP direction, uint64_t steps) { |
| 11535 | for (uint64_t i = 0; i < steps; ++i) { |
| 11536 | #if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) |
| 11537 | start = Catch::nextafter(start, direction); |
| 11538 | #else |
| 11539 | start = std::nextafter(start, direction); |
| 11540 | #endif |
| 11541 | } |
| 11542 | return start; |
| 11543 | } |
| 11544 | |
| 11545 | // Performs equivalent check of std::fabs(lhs - rhs) <= margin |
| 11546 | // But without the subtraction to allow for INFINITY in comparison |
no test coverage detected