Accord.Math.OwensT.Function C# (CSharp) Method

Function() public static method

Computes Owen's T function for arbitrary H and A.
public static Function ( double h, double a ) : double
h double Owen's T function argument H.
a double Owen's T function argument A.
return double
        public static double Function(double h, double a)
        {
            double absa;
            double absh;
            double ah;
            const double cut = 0.67;
            double normah;
            double normh;
            double value;

            absh = Math.Abs(h);
            absa = Math.Abs(a);
            ah = absa * absh;

            if (absa <= 1.0)
            {
                value = Function(absh, absa, ah);
            }
            else if (absh <= cut)
            {
                value = 0.25 - (-0.5 + Normal.Function(absh)) * (-0.5 + Normal.Function(ah))
                  - Function(ah, 1.0 / absa, absh);
            }
            else
            {
                normh = Normal.Complemented(absh);
                normah = Normal.Complemented(ah);
                value = 0.5 * (normh + normah) - normh * normah
                - Function(ah, 1.0 / absa, absh);
            }

            if (a < 0.0)
                value = -value;

            return value;
        }

Same methods

OwensT::Function ( double h, double a, double ah ) : double
OwensT