AngouriMath

Navigation

← Back to list of members

LambertW​(PeterO.​Numbers.​EInteger,​AngouriMath.​Entity.​Number.​Complex)

 Method (no overloads)

Summary

The branch branch of the Lambert W function at z,
the solution w of w e^w = z on that branch, at the working precision; or
null where it is not computed.

Remarks

The branches are those of Corless, Gonnet, Hare, Jeffrey and Knuth, "On the Lambert W
function" (1996), as Mathematica's ProductLog and mpmath's lambertw have
them: the principal branch W_0 is real on [-1/e, +oo), W_(-1) is real
on [-1/e, 0), and a value on a branch cut is the one approached from above.
The branch is found in double precision, where it is cheap, by the kernel the compilers use,
LambertWFunction: from the series in p = sqrt(2 (e z + 1)) about the branch point -1/e, from ln(1 + z) elsewhere on the principal branch short of
|z| = 3, and from ln z + 2 pi i k - ln(ln z + 2 pi i k) otherwise, each then taken to a
root by Halley's iteration. That root is refined by the same iteration
at the working precision, which triples the digits with each step and does not leave the
branch. Near the branch point, where double precision cannot resolve z + 1/e, the
series is evaluated at the working precision instead, and refined from there.
https://github.com/asc-community/AngouriMath/issues/2182

























Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 5629 pages online