From 94be250af7e14c58dcbf476972d2d7141551ff67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kosi=C5=84ski?= Date: Tue, 10 Mar 2026 11:25:30 -0700 Subject: [PATCH] Add documentation for two-argument floating point matchers. PiperOrigin-RevId: 881536386 Change-Id: Idd38bded4dda5a0d0c1c5fd7847fc8134e7c2ece --- docs/reference/matchers.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reference/matchers.md b/docs/reference/matchers.md index 270a5b34..0956c175 100644 --- a/docs/reference/matchers.md +++ b/docs/reference/matchers.md @@ -256,6 +256,14 @@ Matcher | Description `Le()` | `x <= y` `Lt()` | `x < y` `Ne()` | `x != y` +`FloatEq()` | `x` approximately equals `y` +`DoubleEq()` | `x` approximately equals `y` +`NanSensitiveFloatEq()` | Same as `FloatEq()`, but treats two NaNs as equal +`NanSensitiveDoubleEq()` | Same as `DoubleEq()`, but treats two NaNs as equal +`FloatNear(max_abs_error)` | `x` is within `max_abs_error` of `y` +`DoubleNear(max_abs_error)` | `x` is within `max_abs_error` of `y` +`NanSensitiveFloatNear(max_abs_error)` | Same as `FloatNear(max_abs_error)`, but treats two NaNs as near +`NanSensitiveDoubleNear(max_abs_error)` | Same as `DoubleNear(max_abs_error)`, but treats two NaNs as near You can use the following selectors to pick a subset of the arguments (or reorder them) to participate in the matching: