MCPcopy Create free account
hub / github.com/coolxv/cpp-stub / WithinRelMatcher

Class WithinRelMatcher

ut_examples/catch2/ut/include/catch.hpp:3461–3468  ·  view source on GitHub ↗

Given IEEE-754 format for floats and doubles, we can assume that float -> double promotion is lossless. Given this, we can assume that if we do the standard relative comparison of |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get the same result if we do this for floats, as if we do this for doubles that were promoted from floats.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

WithinRelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected