Skip to main content

Module lambert_w

Module lambert_w 

Source
Expand description

The Lambert W function on every complex branch.

W_k(z) solves w e^w = z on branch k ∈ ℤ (Corless, Gonnet, Hare, Jeffrey and Knuth, 1996). W_0 and W_{−1} are real on [−1/e, ∞) and [−1/e, 0); the branch cut of W_0 is (−∞, −1/e], and the real interval of W_{−1} is reached from the upper half plane (so W_{−1}(x + 0i) is real there, matching crate::lambert_w_m1). For real arguments, crate::lambert_w0 and crate::lambert_w_m1 are faster.

See the book entry The Lambert W function.

Functions§

lambert_w
The Lambert W function W_k(z) on branch k. Returns −∞ for W_k(0) with k ≠ 0 and NaN for non-finite input.