quality:corruption
Numerical evaluation

The W function may be approximated using Newton's method, with successive approximations to w = W (z) (so z = we) being

The W function may also be approximated using Halley's method,

given in Corless et al. to compute W.

For real x ≥ − 1 / e {\displaystyle x\geq -1/e}, it may be approximated by the quadratic-rate recursive formula of R. Iacono and J.P. Boyd:

Lajos Lóczi proves that by using this iteration with an appropriate starting value w 0 (x) {\displaystyle w_{0}(x)},

one can determine the maximum number of iteration steps in advance for any precision:

Toshio Fukushima has presented a fast method for approximating the real valued parts of the principal and secondary branches of the W function without using any iteration. In this method the W function is evaluated as a conditional switch of rational functions on transformed varibles: W 0 (z) = { X k (x), (z k − 1 <= z < z k, k = 1, 2, …, 17), U k (u), (z k − 1 <= z < z k, k = 18, 19), {\displaystyle W_{0}(z)={\begin{cases}X_{k}(x),&(z_{k-1}<=z<z_{k},\quad k=1,2,\ldots,17),\\U_{k}(u),&(z_{k-1}<=z<z_{k},\quad k=18,19),\end{cases}}} W − 1 (z) = { Y k (x), (z k − 1 <= z < z k, k = − 1, − 2, …, − 7), V k (u), (z k − 1 <= z < z k, k = − 8, − 9, − 10), {\displaystyle W_{-1}(z)={\begin{cases}Y_{k}(x),&(z_{k-1}<=z<z_{k},\quad k=-1,-2,\ldots,-7),\\V_{k}(u),&(z_{k-1}<=z<z_{k},\quad k=-8,-9,-10),\end{cases}}} where x, u, y and v are transformations of z:

x = z + 1 / e, u = ln z, y = − z / (x + 1 / e), v = ln (− z) {\displaystyle x={\sqrt {z+1/e}},\quad u=\ln {z},\quad y=-z/(x+1/{\sqrt {e}}),\quad v=\ln(-z)}.

Here X k (x) {\displaystyle X_{k}(x)}, U k (u) {\displaystyle U_{k}(u)}, Y k (y) {\displaystyle Y_{k}(y)}, and V k (v) {\displaystyle V_{k}(v)} are rational functions whose coefficients for different k -values are listed in the paper together with the z k {\displaystyle z_{k}} values that determine the subdomains. The paper contains two different sets of these coefficient that can be used to evaluate the W function to an accuracy of 24 and 50 bits respectively when computed on 64-bit floating point values.