pub trait LambertWwhere
Self: Sized,{
// Required methods
fn lambert_w0(self) -> Self;
fn lambert_wm1(self) -> Self;
}Expand description
Lambert W functions.
Required Methods§
Sourcefn lambert_w0(self) -> Self
fn lambert_w0(self) -> Self
Compute the real-valued parts of the princial branch of the Lambert W function.
This function is the inverse of the function
f(w) = we^wwhen w >= -1.
The implementation is based on lambert_w by Johanna Sörngård.
§Examples
use special::LambertW;
let Ω: f64 = 0.5671432904097838;
assert!((1.0.lambert_w0() - Ω).abs() < 1e-15);§References
- T. Fukushima, Precise and fast computation of Lambert W function by piecewise minimax rational function approximation with variable transformation.
Sourcefn lambert_wm1(self) -> Self
fn lambert_wm1(self) -> Self
Compute the real-valued parts of the secondary branch of the Lambert W function.
This function is the inverse of the function
f(w) = we^wwhen w < -1.
The implementation is based on lambert_w by Johanna Sörngård.
§Examples
use special::LambertW;
assert!(((-f64::ln(2.0) / 2.0).lambert_wm1() + f64::ln(4.0)).abs() < 1e-15);§References
- T. Fukushima, Precise and fast computation of Lambert W function by piecewise minimax rational function approximation with variable transformation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.