Computing the Lambert W function in arbitrary-precision complex interval arithmetic

  • Fredrik JohanssonEmail author
Original Paper


We describe an algorithm to evaluate all the complex branches of the Lambert W function with rigorous error bounds in arbitrary-precision interval arithmetic or ball arithmetic. The classic 1996 paper on the Lambert W function by Corless et al. provides a thorough but partly heuristic numerical analysis of the Lambert W function which needs to be complemented with some explicit inequalities and practical observations about managing precision and branch cuts. An implementation is provided in the Arb library.


Lambert W function Interval arithmetic Arbitrary-precision arithmetic Error analysis Special functions Complex arithmetic 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.



The author thanks the two referees, whose input greatly improved the article.


  1. 1.
    Agrawal, N., Bikineev, A., Bristow, P.A., Guazzone, M., Kormanyos, C., Holin, H., Lalande, B., Maddock, J., Murphy, J., Råade, J., Sewani, G., Sobotta, B., Thompson, N., van den Berg, T., Walker, D., Zhang, X.: BOOST C++ Libraries: Lambert W function (2017)
  2. 2.
    Barry, D.A., Culligan-Hensley, P.J., Barry, S.J.: Real values of the W-function. ACM Trans. Math. Softw. 21(2), 161–171 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Chapeau-Blondeau, F., Monir, A.: Numerical evaluation of the Lambert W function and application to generation of generalized Gaussian noise with exponent 1/2. IEEE Trans. Signal Process. 50(9), 2160–2165 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Corless, R.M., Gonnet, G.H., Hare, D.E.G., Jeffrey, D.J., Knuth, D.E.: On the Lambert W function. Adv. Comput. Math. 5(1), 329–359 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Fitsch, F.N., Shafer, R.E., Crowley, W.P.: Algorithm 443: Solution of the transcendental equation w e w = x. Commun. ACM 16(2), 123–124 (1973)CrossRefGoogle Scholar
  6. 6.
    Fukushima, T.: Precise and fast computation of Lambert W-functions without transcendental function evaluations. J. Comput. Appl. Math. 244, 77–89 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    van der Hoeven, J.: Ball arithmetic. Tech. rep., HAL. (2009)
  8. 8.
    Jeffrey, D.J.: Celebrating 20 years of the Lambert W function (2016)
  9. 9.
    Johansson, F.: Efficient implementation of elementary functions in the medium-precision range. In: 22Nd IEEE Symposium on Computer Arithmetic, ARITH22, pp. 83–89. (2015)
  10. 10.
    Johansson, F.: Arb: efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Trans. Comput. 66, 1281–1292 (2017). MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Johansson, F., et al.: mpmath: a Python library for arbitrary-precision floating-point arithmetic (version 1.1) (2018)
  12. 12.
    Kalugin, G.A., Jeffrey, D.J.: Convergence in C of series for the Lambert W function. arXiv:1208.0754 (2012)
  13. 13.
    Lawrence, P.W., Corless, R.M., Jeffrey, D.J.: Algorithm 917: complex double-precision evaluation of the Wright ω function. ACM Trans. Math. Softw. 38(3), 20 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Maplesoft: Productlog – Maple Programming Help (2019)
  15. 15.
    Moore, R.E.: Methods and applications of interval analysis. SIAM (1979)Google Scholar
  16. 16.
    Olver, F.J., Lozier, D.W., Boisvert, R.F., Clark, C.W.: NIST Handbook of Mathematical Functions. Cambridge University Press, Cambridge (2010)zbMATHGoogle Scholar
  17. 17.
    Veberič, D.: Lambert W function for applications in physics. Comput. Phys. Commun. 183(12), 2622–2628 (2012)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Wolfram Research: Productlog – Wolfram Language Documentation (2019)
  19. 19.
    Ziv, A.: Fast evaluation of elementary mathematical functions with correctly rounded last bit. ACM Trans. Math. Softw. 17(3), 410–423 (1991)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  1. 1.INRIA–LFANT, CNRS–IMB–UMR 5251Université de BordeauxTalenceFrance

Personalised recommendations