Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

LambertW

Lambert's W Function


Description

Computes Lambert's W-function.

Usage

LambertW(x)

Arguments

x

Vector of nonnegative numbers.

Details

Lambert's W-function is the inverse function of f(y) = y * exp(y). That is, W is the function such that

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

This command LambertW computes W(x) for each entry in the argument x. If the library gsl has been installed, then the function lambert_W0 in that library is invoked. Otherwise, values of the W-function are computed by root-finding, using the function uniroot.

Computation using gsl is about 100 times faster.

If any entries of x are infinite or NA, the corresponding results are NA.

Value

Numeric vector.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

References

Corless, R, Gonnet, G, Hare, D, Jeffrey, D and Knuth, D (1996), On the Lambert W function. Computational Mathematics, 5, 325–359.

Roy, R and Olver, F (2010), Lambert W function. In Olver, F, Lozier, D and Boisvert, R (eds.), NIST Handbook of Mathematical Functions, Cambridge University Press.

Examples

LambertW(exp(1))

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.