naginterfaces.library.roots.lambertw_complex(branch, offset, z)[source]

lambertw_complex computes the values of Lambert’s function .

For full information please refer to the NAG Library document for c05bb


The branch required.


Controls whether or not is being specified as an offset from .


If , is the offset from of the intended argument to ; that is, is computed, where .

If , is the argument of the function; that is, is computed, where .


The value : see also the description of .


The residual : see also the description of .

(errno )

For the given offset , is negligibly different from : and .

(errno )

is close to . Enter as an offset to for greater accuracy: and .

(errno )

The iterative procedure used internally did not converge in iterations. Check the value of for the accuracy of .


lambertw_complex calculates an approximate value for Lambert’s function (sometimes known as the ‘product log’ or ‘Omega’ function), which is the inverse function of

The function is many-to-one, and so, except at , is multivalued. lambertw_complex allows you to specify the branch of on which you would like the results to lie by using the argument . Our choice of branch cuts is as in Corless et al. (1996), and the ranges of the branches of are summarised in Figure [label omitted].

[figure omitted]

For more information about the closure of each branch, which is not displayed in Figure [label omitted], see Corless et al. (1996). The dotted lines in the Figure denote the asymptotic boundaries of the branches, at multiples of .

The precise method used to approximate is as described in Corless et al. (1996). For close to greater accuracy comes from evaluating rather than : by setting on entry you inform lambertw_complex that you are providing , not , in .


Corless, R M, Gonnet, G H, Hare, D E G, Jeffrey, D J and Knuth, D E, 1996, On the Lambert function, Advances in Comp. Math. (3), 329–359