lambert_w


lambert_w, a Fortran90 code which evaluates Lambert's W function.

Lambert's W function W(X) satisfies the equation

        W(x) * exp ( W(x) ) = x
      

The function is defined for -1/e <= x. There are two branches, joining at -1/e = x. The lower branch extends from -1/e <= x < 0 The upper branch extends from -1/e <= x The function is also known as the "Omega" function.

In Mathematica, the function can be evaluated by: W = ProductLog [ X ] In MATLAB, W = lambertw ( b, x ) In Python, W = scipy.special.lambertw ( x, b )

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

lambert_w is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

lambert_w_test

polpak, an Octave code which evaluates a variety of mathematical functions, polynomials, and sequences, including Bell, Benford, Bernoulli, Bernstein, Cardan, Catalan, Charlier, Chebyshev, Collatz, Delannoy, Euler, Fibonacci, Gegenbauer, Gudermannian, Harmonic, Hermite, Hofstadter, Jacobi, Krawtchouk, Laguerre, Lambert W, Legendre, Lerch, Meixner, Mertens, Moebius, Motzkin, Phi, Stirling, Tau, Tribonacci, Zernike.

test_values, a Fortran90 code which supplies test values of various mathematical functions, including Abramowitz, AGM, Airy, Bell, Bernoulli, Bessel, Beta, Binomial, Bivariate Normal, Catalan, Cauchy, Chebyshev, Chi Square, Clausen, Clebsch Gordan, Collatz, Cosine integral, Dawson, Debye, Dedekind, dilogarithm, Exponential integral, Elliptic, Error, Euler, Exponential integral, F probability, Fresnel, Frobenius, Gamma, Gegenbauer, Goodwin, Gudermannian, Harmonic, Hermite, Hypergeometric, inverse trigonometic, Jacobi, Julian Ephemeris Date, Kelvin, Laguerre, Lambert W, Laplace, Legendre, Lerch, Lobachevsky, Lobatto, Logarithmic integral, Log normal, McNugget numbers, Mertens, Mittag-Leffler, Moebius, Multinomial, Negative binomial, Nine J, Normal, Omega, Owen, Partition, Phi, Pi, Poisson, Polylogarithm, Polyomino, Prime, Psi, Rayleigh, Hyperbolic Sine integral, Sigma, Sine Power integral, Sine integral, Six J, Sphere area, Sphere volume, Spherical harmonic, Stirling, Stromgen, Struve, Student, Subfactorial, Student probability, Three J, Transport, Trigamma, Truncated normal, van der Corput, von Mises, Weibull, Wright omega, Zeta.

toms443, a Fortran90 code which evaluates Lambert's W function. This is a version of ACM TOMS algorithm 443.

toms743, a Fortran90 code which evaluates Lambert's W function. This is a version of ACM TOMS algorithm 743, by Barry, Barry and Culligan-Hensley.

Reference:

  1. Fred Fritsch, RE Shafer, WP Crowley,
    Algorithm 443: Solution of the Transcendental Equation W*exp(W)=X,
    Communications of the ACM,
    Volume 16, Number 1, February 1973, pages 123-124.
  2. Andrew Barry, S. J. Barry, Patricia Culligan-Hensley,
    Algorithm 743: WAPR - A Fortran routine for calculating real values of the W-function,
    ACM Transactions on Mathematical Software,
    Volume 21, Number 2, June 1995, pages 172-181.

Source Code:


Last revised on 20 June 2023.