#ifndef _utl_LambertW_h_ #define _utl_LambertW_h_ /** \author Darko Veberic \version $Id: LambertW.h 16989 2010-06-25 09:06:55Z lukas $ \date 25 Jun 2009 */ namespace utl { /** Approximate Lambert W function Accuracy at least 5 decimal places in all definition range. See LambertW() for details. \tparam branch: valid values are 0 and -1 \param x: real-valued argument \f$\geq-1/e\f$ \ingroup math */ template double LambertWApproximation(const double x); /** Lambert W function \image html utl_LambertW.png Lambert function \f$y={\rm W}(x)\f$ is defined as a solution to the \f$x=ye^y\f$ expression and is also known as "product logarithm". Since the inverse of \f$ye^y\f$ is not single-valued, the Lambert function has two real branches \f${\rm W}_0\f$ and \f${\rm W}_{-1}\f$. \f${\rm W}_0(x)\f$ has real values in the interval \f$[-1/e,\infty]\f$ and \f${\rm W}_{-1}(x)\f$ has real values in the interval \f$[-1/e,0]\f$. Accuracy is the nominal double type resolution (16 decimal places). \tparam branch: valid values are 0 and -1 \param x: real-valued argument \f$\geq-1/e\f$ (range depends on branch) \ingroup math */ template double LambertW(const double x); } #endif