nag_roots_lambertw_complex (c05bb) 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. nag_roots_lambertw_complex (c05bb) allows you to specify the branch of on which you would like the results to lie by using the argument branch. Our choice of branch cuts is as in Corless et al. (1996), and the ranges of the branches of are summarised in Figure 1.
Figure 1: Ranges of the branches of
For more information about the closure of each branch, which is not displayed in
Figure 1, 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 nag_roots_lambertw_complex (c05bb) that you are providing , not , in z.
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
Compulsory Input Parameters
– int64int32nag_int scalar
The branch required.
– logical scalar
Controls whether or not z is being specified as an offset from .
– complex scalar
If , z is the offset from of the intended argument to ; that is, is computed, where .
If , z is the argument of the function; that is, is computed, where .
Note:nag_roots_lambertw_complex (c05bb) may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the function:
Cases prefixed with W are classified as warnings and
do not generate an error of type NAG:error_n. See nag_issue_warnings.
For the given offset , is negligibly different from .
is close to .
The iterative procedure used internally did not converge in iterations. Check the value of resid for the accuracy of w.
An unexpected error has been triggered by this routine. Please
Your licence key may have expired or may not have been installed correctly.
Dynamic memory allocation failed.
For a high percentage of , nag_roots_lambertw_complex (c05bb) is accurate to the number of decimal digits of precision on the host machine (see nag_machine_decimal_digits (x02be)). An extra digit may be lost on some platforms and for a small proportion of . This depends on the accuracy of the base- logarithm on your system.
The following figures show the principal branch of .