Artemis.Engine.Maths.SpecialFunctions.CiApprox C# (CSharp) Метод

CiApprox() публичный статический Метод

Approximately evaluate the cosine integral at x. This approximation only converges for |x| <= 5π. The cosine integral is defined as x / Ci(x) = γ + ln(x) + | (cos(t) - 1)/t dt / 0
public static CiApprox ( double x ) : double
x double
Результат double
        public static double CiApprox(double x)
        {
            var x2 = x * x;
            // This is the Padé Approximant of Si, given by
            //      https://en.wikipedia.org/wiki/Trigonometric_integral
            return 0.577215664901532861 + Math.Log(x)
                + x2 * (-0.25
                    + x2 * (7.51851524438898291e-3
                        + x2 * (-1.27528342240267686e-4
                            + x2 * (1.05297363846239184e-6
                                + x2 * (-4.68889508144848019e-9
                                    + x2 * (1.06480802891189243e-11
                                        + x2 * (-9.93728488857585407e-15)))))))
                / (1.0
                    + x2 * (1.1592605689110735e-2
                        + x2 * (6.72126800814254432e-5
                            + x2 * (2.55533277086129636e-7
                                + x2 * (6.97071295760958946e-10
                                    + x2 * (1.38536352772778619e-12
                                        + x2 * (1.89106054713059759e-15
                                            + x2 * (1.39759616731376855e-18))))))));
        }