naginterfaces.library.roots.lambertw_​real

naginterfaces.library.roots.lambertw_real(x, branch, offset)[source]

lambertw_real returns the real values of Lambert’s function .

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/c05/c05baf.html

Parameters
xfloat

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 .

branchint

The real branch required.

The branch is selected.

The branch is selected.

offsetbool

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

Returns
lambwfloat

The real values of Lambert’s function .

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

On entry, and .

Constraint: if then .

(errno )

On entry, and .

Constraint: if then .

(errno )

On entry, , and .

Constraint: if and then .

(errno )

On entry, , and .

Constraint: if and then .

Warns
NagAlgorithmicWarning
(errno )

For the given offset , is negligibly different from : .

(errno )

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

Notes

lambertw_real calculates an approximate value for the real branches of 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_real restricts and its argument to be real, resulting in a function defined for and which is double valued on the interval . This double-valued function is split into two real-valued branches according to the sign of . We denote by the branch satisfying for all real , and by the branch satisfying for all real . You may select your branch of interest using the argument .

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

References

Barry, D J, Culligan–Hensley, P J, and Barry, S J, 1995, Real values of the -function, ACM Trans. Math. Software (21(2)), 161–171