Pchp.Library.PhpMath.expm1 C# (CSharp) Method

expm1() public static method

expm1() returns the equivalent to 'exp(arg) - 1' computed in a way that is accurate even if the value of arg is near zero, a case where 'exp (arg) - 1' would be inaccurate due to subtraction of two numbers that are nearly equal.
public static expm1 ( double x ) : double
x double The argument to process
return double
        public static double expm1(double x)
        {
            return Math.Exp(x) - 1.0;   // TODO: implement exp(x)-1 for x near to zero
        }