rust-cyphus / cyphus-specfun

Special functions for Rust
GNU General Public License v3.0
3 stars 0 forks source link

Lambert-W #10

Closed LoganAMorrison closed 4 years ago

LoganAMorrison commented 4 years ago

Implement the Lambert-W function

LoganAMorrison commented 4 years ago

Implemented!

use cyphus_specfun::lambert_w::LambertW;
let x:f64 = 1.0;
assert!((x.lambert_w0() -0.5671432904097839).abs() < 1e-10);
assert!((x.lambert_w0_e().val -0.5671432904097839).abs() < 1e-10);

Also implemented lambert_wm1 and lambert_wm1_e