From e80502554aa3f240a907528e3e5720cfac5f73b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20S=C3=B6rng=C3=A5rd?= Date: Sat, 5 Oct 2024 14:36:37 +0200 Subject: [PATCH] Correct test on 32 bit impl. Add test to 64 bit impl --- src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 7416f09..c707ca2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -414,7 +414,7 @@ impl LambertW for f32 { /// # use approx::assert_abs_diff_eq; /// use lambert_w::LambertW; /// - /// assert_abs_diff_eq!((-1e-30).lambert_wm1(), -73.373110313822977); + /// assert_abs_diff_eq!((-1e-30).lambert_wm1(), -73.37311, epsilon = 1e-6); /// ``` #[inline] fn lambert_wm1(self) -> Self::Output { @@ -447,6 +447,15 @@ impl LambertW for f64 { /// The secondary branch of the Lambert W function evaluated to 50 bits of accuracy. /// /// Delegates to the [`lambert_wm1`] function. + /// + /// # Example + /// + /// ``` + /// # use approx::assert_abs_diff_eq; + /// use lambert_w::LambertW; + /// + /// assert_abs_diff_eq!((-1e-30).lambert_wm1(), -73.37311031382298); + /// ``` #[inline] fn lambert_wm1(self) -> Self::Output { lambert_wm1(self)