Sharith.MathUtils.XMath.AsymptFactorial C# (CSharp) Method

AsymptFactorial() public static method

public static AsymptFactorial ( double x ) : double
x double
return double
        public static double AsymptFactorial(double x)
        {
            // error of order O(x^-5)
            // double ln2Pi = 1.8378770664093455 = Math.log(2 * Math.PI);
            double a = x + x + 1;
            return (1.8378770664093455 + System.Math.Log(a / 2) * a - a
                    - (1 - 7 / (30 * a * a)) / (6 * a)) / 2;
        }

Same methods

XMath::AsymptFactorial ( int x ) : string