| 11378 | |
| 11379 | template <typename FP> |
| 11380 | FP step(FP start, FP direction, uint64_t steps) { |
| 11381 | for (uint64_t i = 0; i < steps; ++i) { |
| 11382 | #if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) |
| 11383 | start = Catch::nextafter(start, direction); |
| 11384 | #else |
| 11385 | start = std::nextafter(start, direction); |
| 11386 | #endif |
| 11387 | } |
| 11388 | return start; |
| 11389 | } |
| 11390 | |
| 11391 | // Performs equivalent check of std::fabs(lhs - rhs) <= margin |
| 11392 | // But without the subtraction to allow for INFINITY in comparison |