Allow full range of target ULP values for the ULPMatcher

Previously it was limited to roughly 2 billion ULPs, rather than
the roughly 2^64 possible ones.
This commit is contained in:
Martin Hořeňovský
2019-10-05 13:23:14 +02:00
parent ebc5609484
commit c38a5caa2e
8 changed files with 34 additions and 58 deletions

View File

@@ -372,7 +372,7 @@ namespace { namespace MatchersTests {
REQUIRE_THROWS_AS(WithinAbs(1.f, -1.f), std::domain_error);
REQUIRE_NOTHROW(WithinULP(1.f, 0));
REQUIRE_THROWS_AS(WithinULP(1.f, -1), std::domain_error);
REQUIRE_THROWS_AS(WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error);
}
}
@@ -408,7 +408,6 @@ namespace { namespace MatchersTests {
REQUIRE_THROWS_AS(WithinAbs(1., -1.), std::domain_error);
REQUIRE_NOTHROW(WithinULP(1., 0));
REQUIRE_THROWS_AS(WithinULP(1., -1), std::domain_error);
}
}