Real Values of the Lambert W Function

Calculation of real values of the Lambert W function

You are now following this Submission

The Lambert package contains a function (wapr) for calculating real values of the Lambert W function, as well as a test module for testing wapr against high precision results.
Note: The Symbolic Math Toolbox already contains Maple's implementation of the W function. The Maple version accepts complex arguments, and gives results for complex branches of W.
Syntax:
[w,nerror] = wapr(x,nb,l,m);
where

w = output, W(x);

nerror = error flag, 0 (no errors), or 1 (error);

x = argument of W;

nb = branch (0 for upper branch - default, anything else for the lower branch);

l ~= 1, argument x is actual value for which W is desired (default); = 1, argument x is positive offset from -exp(-1);

m = 1, print error/information messages, ~= 1, don't print anything (default).

Cite As

D. A. Barry (2026). Real Values of the Lambert W Function (https://www.mathworks.com/matlabcentral/fileexchange/3644-real-values-of-the-lambert-w-function), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

Minor changes to remove warnings in the code -- the functioning of the code is unchanged

1.0.0.0

BSD License update