From d81ab73501be80fb47fa7f0356eb75c6742ab8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 14 Jun 2019 20:16:12 +0200 Subject: [PATCH] Show bound when stringifying the WithinULP matcher Closes #1581 --- include/internal/catch_matchers_floating.cpp | 35 +++++++++++++- .../Baselines/compact.sw.approved.txt | 40 ++++++++-------- .../Baselines/console.sw.approved.txt | 47 +++++++++++-------- .../SelfTest/Baselines/xml.sw.approved.txt | 40 ++++++++-------- 4 files changed, 101 insertions(+), 61 deletions(-) diff --git a/include/internal/catch_matchers_floating.cpp b/include/internal/catch_matchers_floating.cpp index 9bc082edea..d001b751cb 100644 --- a/include/internal/catch_matchers_floating.cpp +++ b/include/internal/catch_matchers_floating.cpp @@ -14,6 +14,9 @@ #include #include #include +#include +#include +#include namespace Catch { namespace Matchers { @@ -74,8 +77,16 @@ bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) { return ulpDiff <= maxUlpDiff; } +template +FP step(FP start, FP direction, int steps) { + for (int i = 0; i < steps; ++i) { + start = std::nextafter(start, direction); + } + return start; } +} // end anonymous namespace + namespace Catch { namespace Matchers { @@ -125,7 +136,29 @@ namespace Floating { #endif std::string WithinUlpsMatcher::describe() const { - return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : ""); + std::stringstream ret; + + ret << "is within " << m_ulps << " ULPs of " << ::Catch::Detail::stringify(m_target); + + if (m_type == FloatingPointKind::Float) { + ret << 'f'; + } + + ret << " (["; + ret << std::fixed << std::setprecision(std::numeric_limits::max_digits10); + if (m_type == FloatingPointKind::Double) { + ret << step(m_target, static_cast(-INFINITY), m_ulps) + << ", " + << step(m_target, static_cast(INFINITY), m_ulps); + } else { + ret << step(static_cast(m_target), -INFINITY, m_ulps) + << ", " + << step(static_cast(m_target), INFINITY, m_ulps); + } + ret << "])"; + + return ret.str(); + //return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : ""); } }// namespace Floating diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt index eb30151f32..6165f98481 100644 --- a/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -401,16 +401,16 @@ Matchers.tests.cpp:: passed: 11., !WithinAbs(10., 0.5) for: 11.0 no Matchers.tests.cpp:: passed: 10., !WithinAbs(11., 0.5) for: 10.0 not is within 0.5 of 11.0 Matchers.tests.cpp:: passed: -10., WithinAbs(-10., 0.5) for: -10.0 is within 0.5 of -10.0 Matchers.tests.cpp:: passed: -10., WithinAbs(-9.6, 0.5) for: -10.0 is within 0.5 of -9.6 -Matchers.tests.cpp:: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0 -Matchers.tests.cpp:: passed: nextafter(1., 2.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0 -Matchers.tests.cpp:: passed: nextafter(1., 0.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0 -Matchers.tests.cpp:: passed: nextafter(1., 2.), !WithinULP(1., 0) for: 1.0 not is within 0 ULPs of 1.0 -Matchers.tests.cpp:: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0 -Matchers.tests.cpp:: passed: -0., WithinULP(0., 0) for: -0.0 is within 0 ULPs of 0.0 -Matchers.tests.cpp:: passed: NAN, !WithinULP(NAN, 123) for: nanf not is within 123 ULPs of nanf -Matchers.tests.cpp:: passed: 1., WithinAbs(1., 0.5) || WithinULP(2., 1) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ) -Matchers.tests.cpp:: passed: 1., WithinAbs(2., 0.5) || WithinULP(1., 0) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ) -Matchers.tests.cpp:: passed: NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) for: nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) +Matchers.tests.cpp:: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) +Matchers.tests.cpp:: passed: nextafter(1., 2.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0 ([0.99999999999999989, 1.00000000000000022]) +Matchers.tests.cpp:: passed: nextafter(1., 0.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0 ([0.99999999999999989, 1.00000000000000022]) +Matchers.tests.cpp:: passed: nextafter(1., 2.), !WithinULP(1., 0) for: 1.0 not is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) +Matchers.tests.cpp:: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) +Matchers.tests.cpp:: passed: -0., WithinULP(0., 0) for: -0.0 is within 0 ULPs of 0.0 ([0.00000000000000000, 0.00000000000000000]) +Matchers.tests.cpp:: passed: NAN, !WithinULP(NAN, 123) for: nanf not is within 123 ULPs of nanf ([nan, nan]) +Matchers.tests.cpp:: passed: 1., WithinAbs(1., 0.5) || WithinULP(2., 1) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ([1.99999999999999978, 2.00000000000000044]) ) +Matchers.tests.cpp:: passed: 1., WithinAbs(2., 0.5) || WithinULP(1., 0) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) ) +Matchers.tests.cpp:: passed: NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) for: nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ([nan, nan]) ) Matchers.tests.cpp:: passed: WithinAbs(1., 0.) Matchers.tests.cpp:: passed: WithinAbs(1., -1.), std::domain_error Matchers.tests.cpp:: passed: WithinULP(1., 0) @@ -425,16 +425,16 @@ Matchers.tests.cpp:: passed: 11.f, !WithinAbs(10.f, 0.5f) for: 11.0 Matchers.tests.cpp:: passed: 10.f, !WithinAbs(11.f, 0.5f) for: 10.0f not is within 0.5 of 11.0 Matchers.tests.cpp:: passed: -10.f, WithinAbs(-10.f, 0.5f) for: -10.0f is within 0.5 of -10.0 Matchers.tests.cpp:: passed: -10.f, WithinAbs(-9.6f, 0.5f) for: -10.0f is within 0.5 of -9.6000003815 -Matchers.tests.cpp:: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.0f -Matchers.tests.cpp:: passed: nextafter(1.f, 2.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.0f -Matchers.tests.cpp:: passed: nextafter(1.f, 0.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.0f -Matchers.tests.cpp:: passed: nextafter(1.f, 2.f), !WithinULP(1.f, 0) for: 1.0f not is within 0 ULPs of 1.0f -Matchers.tests.cpp:: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.0f -Matchers.tests.cpp:: passed: -0.f, WithinULP(0.f, 0) for: -0.0f is within 0 ULPs of 0.0f -Matchers.tests.cpp:: passed: NAN, !WithinULP(NAN, 123) for: nanf not is within 123 ULPs of nanf -Matchers.tests.cpp:: passed: 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) -Matchers.tests.cpp:: passed: 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) -Matchers.tests.cpp:: passed: NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) for: nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) +Matchers.tests.cpp:: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) +Matchers.tests.cpp:: passed: nextafter(1.f, 2.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) +Matchers.tests.cpp:: passed: nextafter(1.f, 0.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) +Matchers.tests.cpp:: passed: nextafter(1.f, 2.f), !WithinULP(1.f, 0) for: 1.0f not is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) +Matchers.tests.cpp:: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) +Matchers.tests.cpp:: passed: -0.f, WithinULP(0.f, 0) for: -0.0f is within 0 ULPs of 0.0f ([0.00000000000000000, 0.00000000000000000]) +Matchers.tests.cpp:: passed: NAN, !WithinULP(NAN, 123) for: nanf not is within 123 ULPs of nanf ([nan, nan]) +Matchers.tests.cpp:: passed: 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) ) +Matchers.tests.cpp:: passed: 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) ) +Matchers.tests.cpp:: passed: NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) for: nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ([nan, nan]) ) Matchers.tests.cpp:: passed: WithinAbs(1.f, 0.f) Matchers.tests.cpp:: passed: WithinAbs(1.f, -1.f), std::domain_error Matchers.tests.cpp:: passed: WithinULP(1.f, 0) diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 3ff1e189af..b2055e1a76 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -2984,37 +2984,37 @@ Matchers.tests.cpp: Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1., WithinULP(1., 0) ) with expansion: - 1.0 is within 0 ULPs of 1.0 + 1.0 is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( nextafter(1., 2.), WithinULP(1., 1) ) with expansion: - 1.0 is within 1 ULPs of 1.0 + 1.0 is within 1 ULPs of 1.0 ([0.99999999999999989, 1.00000000000000022]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( nextafter(1., 0.), WithinULP(1., 1) ) with expansion: - 1.0 is within 1 ULPs of 1.0 + 1.0 is within 1 ULPs of 1.0 ([0.99999999999999989, 1.00000000000000022]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( nextafter(1., 2.), !WithinULP(1., 0) ) with expansion: - 1.0 not is within 0 ULPs of 1.0 + 1.0 not is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1., WithinULP(1., 0) ) with expansion: - 1.0 is within 0 ULPs of 1.0 + 1.0 is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( -0., WithinULP(0., 0) ) with expansion: - -0.0 is within 0 ULPs of 0.0 + -0.0 is within 0 ULPs of 0.0 ([0.00000000000000000, 0.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( NAN, !WithinULP(NAN, 123) ) with expansion: - nanf not is within 123 ULPs of nanf + nanf not is within 123 ULPs of nanf ([nan, nan]) ------------------------------------------------------------------------------- Floating point matchers: double @@ -3026,17 +3026,20 @@ Matchers.tests.cpp: Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1., WithinAbs(1., 0.5) || WithinULP(2., 1) ) with expansion: - 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ) + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ([1.99999999999999978, + 2.00000000000000044]) ) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1., WithinAbs(2., 0.5) || WithinULP(1., 0) ) with expansion: - 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ) + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ([1.00000000000000000, + 1.00000000000000000]) ) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) ) with expansion: - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ([nan, nan]) + ) ------------------------------------------------------------------------------- Floating point matchers: double @@ -3124,37 +3127,38 @@ Matchers.tests.cpp: Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1.f, WithinULP(1.f, 0) ) with expansion: - 1.0f is within 0 ULPs of 1.0f + 1.0f is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( nextafter(1.f, 2.f), WithinULP(1.f, 1) ) with expansion: - 1.0f is within 1 ULPs of 1.0f + 1.0f is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( nextafter(1.f, 0.f), WithinULP(1.f, 1) ) with expansion: - 1.0f is within 1 ULPs of 1.0f + 1.0f is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( nextafter(1.f, 2.f), !WithinULP(1.f, 0) ) with expansion: - 1.0f not is within 0 ULPs of 1.0f + 1.0f not is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000] + ) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1.f, WithinULP(1.f, 0) ) with expansion: - 1.0f is within 0 ULPs of 1.0f + 1.0f is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( -0.f, WithinULP(0.f, 0) ) with expansion: - -0.0f is within 0 ULPs of 0.0f + -0.0f is within 0 ULPs of 0.0f ([0.00000000000000000, 0.00000000000000000]) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( NAN, !WithinULP(NAN, 123) ) with expansion: - nanf not is within 123 ULPs of nanf + nanf not is within 123 ULPs of nanf ([nan, nan]) ------------------------------------------------------------------------------- Floating point matchers: float @@ -3166,17 +3170,20 @@ Matchers.tests.cpp: Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) ) with expansion: - 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ([0. + 99999994039535522, 1.00000011920928955]) ) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) ) with expansion: - 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ([1. + 00000000000000000, 1.00000000000000000]) ) Matchers.tests.cpp:: PASSED: REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) ) with expansion: - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ([nan, nan]) + ) ------------------------------------------------------------------------------- Floating point matchers: float diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 0d306b2e52..2e3844cb0c 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -3576,7 +3576,7 @@ Nor would this 1., WithinULP(1., 0) - 1.0 is within 0 ULPs of 1.0 + 1.0 is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) @@ -3584,7 +3584,7 @@ Nor would this nextafter(1., 2.), WithinULP(1., 1) - 1.0 is within 1 ULPs of 1.0 + 1.0 is within 1 ULPs of 1.0 ([0.99999999999999989, 1.00000000000000022]) @@ -3592,7 +3592,7 @@ Nor would this nextafter(1., 0.), WithinULP(1., 1) - 1.0 is within 1 ULPs of 1.0 + 1.0 is within 1 ULPs of 1.0 ([0.99999999999999989, 1.00000000000000022]) @@ -3600,7 +3600,7 @@ Nor would this nextafter(1., 2.), !WithinULP(1., 0) - 1.0 not is within 0 ULPs of 1.0 + 1.0 not is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) @@ -3608,7 +3608,7 @@ Nor would this 1., WithinULP(1., 0) - 1.0 is within 0 ULPs of 1.0 + 1.0 is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) @@ -3616,7 +3616,7 @@ Nor would this -0., WithinULP(0., 0) - -0.0 is within 0 ULPs of 0.0 + -0.0 is within 0 ULPs of 0.0 ([0.00000000000000000, 0.00000000000000000]) @@ -3624,7 +3624,7 @@ Nor would this NAN, !WithinULP(NAN, 123) - nanf not is within 123 ULPs of nanf + nanf not is within 123 ULPs of nanf ([nan, nan]) @@ -3635,7 +3635,7 @@ Nor would this 1., WithinAbs(1., 0.5) || WithinULP(2., 1) - 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ) + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ([1.99999999999999978, 2.00000000000000044]) ) @@ -3643,7 +3643,7 @@ Nor would this 1., WithinAbs(2., 0.5) || WithinULP(1., 0) - 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ) + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ([1.00000000000000000, 1.00000000000000000]) ) @@ -3651,7 +3651,7 @@ Nor would this NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ([nan, nan]) ) @@ -3783,7 +3783,7 @@ Nor would this 1.f, WithinULP(1.f, 0) - 1.0f is within 0 ULPs of 1.0f + 1.0f is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) @@ -3791,7 +3791,7 @@ Nor would this nextafter(1.f, 2.f), WithinULP(1.f, 1) - 1.0f is within 1 ULPs of 1.0f + 1.0f is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) @@ -3799,7 +3799,7 @@ Nor would this nextafter(1.f, 0.f), WithinULP(1.f, 1) - 1.0f is within 1 ULPs of 1.0f + 1.0f is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) @@ -3807,7 +3807,7 @@ Nor would this nextafter(1.f, 2.f), !WithinULP(1.f, 0) - 1.0f not is within 0 ULPs of 1.0f + 1.0f not is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) @@ -3815,7 +3815,7 @@ Nor would this 1.f, WithinULP(1.f, 0) - 1.0f is within 0 ULPs of 1.0f + 1.0f is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) @@ -3823,7 +3823,7 @@ Nor would this -0.f, WithinULP(0.f, 0) - -0.0f is within 0 ULPs of 0.0f + -0.0f is within 0 ULPs of 0.0f ([0.00000000000000000, 0.00000000000000000]) @@ -3831,7 +3831,7 @@ Nor would this NAN, !WithinULP(NAN, 123) - nanf not is within 123 ULPs of nanf + nanf not is within 123 ULPs of nanf ([nan, nan]) @@ -3842,7 +3842,7 @@ Nor would this 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) - 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ([0.99999994039535522, 1.00000011920928955]) ) @@ -3850,7 +3850,7 @@ Nor would this 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) - 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ([1.00000000000000000, 1.00000000000000000]) ) @@ -3858,7 +3858,7 @@ Nor would this NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ([nan, nan]) )