Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-07-26 22:01:04 +0200
committerMartin Hořeňovský2021-07-27 21:04:41 +0200
commit3d1cf95b3247e962ab7ae926b5547c64738a13d9 (patch)
tree2189db1a3c3016bf7ac5d6708e2e7dd670222504 /docs
parent6f21a3609cea360846a0ca93be55877cca14c86d (diff)
downloadcatch3-3d1cf95b3247e962ab7ae926b5547c64738a13d9.tar.gz
Fix ulp distance calculation for numbers with different signs
This is a simplification of the fix proposed in #2152, with the critical function split out so that it can be tested directly, without having to go through the ULP matcher. Closes #2152
Diffstat (limited to 'docs')
-rw-r--r--docs/matchers.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/matchers.md b/docs/matchers.md
index 35515889..536d1f81 100644
--- a/docs/matchers.md
+++ b/docs/matchers.md
@@ -161,6 +161,11 @@ away from the `target` value. The short version of what this means
is that there is no more than `maxUlpDiff - 1` representeable floating
point numbers between the argument for matching and the `target` value.
+**Important**: The WithinULP matcher requires the platform to use the
+[IEEE-754](https://en.wikipedia.org/wiki/IEEE_754) representation for
+floating point numbers.
+
+
`WithinRel` creates a matcher that accepts floating point numbers that
are _approximately equal_ with the `target` with tolerance of `eps.`
Specifically, it matches if