From 9947a6eade30bfb1b4742f98dfd23dfa84e91aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20S=C3=B6rng=C3=A5rd?= Date: Mon, 2 Sep 2024 12:29:57 +0200 Subject: [PATCH] Add comments that describe how the constants were rounded. --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7c59b7a..90b557a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,14 +96,17 @@ mod swm1f; /// The negative inverse of e (-1/e). /// /// This is the smallest input value for which the Lambert W functions in this crate return a value. +// Rounded from -0.367_879_441_171_442_322 pub const NEG_INV_E: f64 = -0.367_879_441_171_442_32; /// 1/sqrt(e) +// Rounded from 0.606_530_659_712_633_423 const INV_SQRT_E: f64 = 0.606_530_659_712_633_4; /// The Omega constant (Ω). /// /// Fulfills the equation Ωe^Ω = 1. +// Rounded from 0.567_143_290_409_783_87 to the closest `f64` value. pub const OMEGA: f64 = 0.567_143_290_409_783_8; #[cfg(feature = "24bits")]