From dbfd9bcc06ff9b1e601bfd8735e65bfc4f546853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20S=C3=B6rng=C3=A5rd?= Date: Sat, 5 Oct 2024 14:42:15 +0200 Subject: [PATCH] Add comments explaining large epsilon --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 9cfb8f9..37d2763 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -414,6 +414,8 @@ impl LambertW for f32 { /// # use approx::assert_abs_diff_eq; /// use lambert_w::LambertW; /// + // The large epsilon is set to let this test pass when the `estrin` feature is enabled, + // since the CI may not have fused multiply-add instructions. /// assert_abs_diff_eq!((-1e-30).lambert_wm1(), -73.37311, epsilon = 1e-4); /// ``` #[inline] @@ -453,7 +455,8 @@ impl LambertW for f64 { /// ``` /// # use approx::assert_abs_diff_eq; /// use lambert_w::LambertW; - /// + // The large epsilon is set to let this test pass when the `estrin` feature is enabled, + // since the CI may not have fused multiply-add instructions. /// assert_abs_diff_eq!((-1e-30).lambert_wm1(), -73.37311031382298, epsilon = 1e-13); /// ``` #[inline]