ErrorFunction Type

Hosts the direct and the complementary error function.

Constructors

Constructor Description

ErrorFunction()

Full Usage: ErrorFunction()

Static members

Static member Description

ErrorFunction.Dawson(x)

Full Usage: ErrorFunction.Dawson(x)

Parameters:
    x : float - The function argument

Returns: float Dawson's integral for argument x.

Dawson(x) evaluates Dawson's integral for a double precision real argument x.

                                  2  / x   2
                                -x   |    t
                        F(x) = e     |   e    dt
                                     |
                                     / 0

x : float

The function argument

Returns: float

Dawson's integral for argument x.

ErrorFunction.Dawson(x, bDebug)

Full Usage: ErrorFunction.Dawson(x, bDebug)

Parameters:
    x : float - The function argument
    bDebug : bool - If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: float Dawson's integral for argument x.

Dawson(x) evaluates Dawson's integral for a double precision real argument x.

                                  2  / x   2
                                -x   |    t
                        F(x) = e     |   e    dt
                                     |
                                     / 0

x : float

The function argument

bDebug : bool

If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: float

Dawson's integral for argument x.

ErrorFunction.Erf(x)

Full Usage: ErrorFunction.Erf(x)

Parameters:
    x : float - The argument x.

Returns: float The error function value of the argument x.

Erf(x) calculates the double precision error function for double precision argument x.

             This is a translation from the Fortran version of SLATEC, FNLIB,
             CATEGORY C8A, L5A1E, REVISION 920618, originally written by Fullerton W.,(LANL)
             to C++.
            
             Series for erf        on the interval  0.          to  1.00000E+00
                                    with weighted error   1.28E-32
                                    log weighted error  31.89
                                    significant figures required  31.05
                                    decimal places required  32.55

x : float

The argument x.

Returns: float

The error function value of the argument x.

ErrorFunction.Erf(x, bDebug)

Full Usage: ErrorFunction.Erf(x, bDebug)

Parameters:
    x : float - The argument x.
    bDebug : bool - If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: float The error function value of the argument x.

Erf(x) calculates the double precision error function for double precision argument x.

             This is a translation from the Fortran version of SLATEC, FNLIB,
             CATEGORY C8A, L5A1E, REVISION 920618, originally written by Fullerton W.,(LANL)
             to C++.
            
             Series for erf        on the interval  0.          to  1.00000E+00
                                    with weighted error   1.28E-32
                                    log weighted error  31.89
                                    significant figures required  31.05
                                    decimal places required  32.55

x : float

The argument x.

bDebug : bool

If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: float

The error function value of the argument x.

ErrorFunction.Erfc(x)

Full Usage: ErrorFunction.Erfc(x)

Parameters:
    x : float - The argument x.

Returns: float The complementary error function of the argument x.

Erfc(x) calculates the double precision complementary error function for double precision argument x.

x : float

The argument x.

Returns: float

The complementary error function of the argument x.

ErrorFunction.Erfc(x, bDebug)

Full Usage: ErrorFunction.Erfc(x, bDebug)

Parameters:
    x : float - The argument x.
    bDebug : bool - If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: float The complementary error function of the argument x.

Erfc(x) calculates the double precision complementary error function for double precision argument x.

x : float

The argument x.

bDebug : bool

If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: float

The complementary error function of the argument x.

ErrorFunction.Faddeeva(z)

Full Usage: ErrorFunction.Faddeeva(z)

Parameters:
    z : Complex - The function argument.

Returns: Complex The faddeeva function w(z).

Given a complex number z = (x,y), this subroutine computes the value of the Faddeeva function w(z) = exp(-z^2)*erfc(-i*z), where erfc is the complex complementary error function and i means sqrt(-1).

             The accuracy of the algorithm for z in the 1st and 2nd quadrant
             is 14 significant digits; in the 3rd and 4th it is 13 significant
             digits outside a circular region with radius 0.126 around a zero
             of the function.
            
             All real variables in the program are double precision.
             The parameter M_2_SQRTPI equals 2/sqrt(pi).
            
             The routine is not underflow-protected but any variable can be
             put to 0 upon underflow;
            
             The routine is overflow-protected: Matpack::Error() is called.
            
             References:
            
             (1) G.P.M. Poppe, C.M.J. Wijers; More Efficient Computation of
                 the Complex Error-Function, ACM Trans. Math. Software,
                 Vol. 16, no. 1, pp. 47.
             (2) Algorithm 680, collected algorithms from ACM.
            
             The Fortran source code was translated to C++ by B.M. Gammel
             and added to the Matpack library, 1992.
            
             Last change: B. M. Gammel, 18.03.1996 error handling

z : Complex

The function argument.

Returns: Complex

The faddeeva function w(z).

ErrorFunction.Faddeeva(z, bDebug)

Full Usage: ErrorFunction.Faddeeva(z, bDebug)

Parameters:
    z : Complex - The function argument.
    bDebug : bool - If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: Complex The faddeeva function w(z).

Given a complex number z = (x,y), this subroutine computes the value of the Faddeeva function w(z) = exp(-z^2)*erfc(-i*z), where erfc is the complex complementary error function and i means sqrt(-1).

             The accuracy of the algorithm for z in the 1st and 2nd quadrant
             is 14 significant digits; in the 3rd and 4th it is 13 significant
             digits outside a circular region with radius 0.126 around a zero
             of the function.
            
             All real variables in the program are double precision.
             The parameter M_2_SQRTPI equals 2/sqrt(pi).
            
             The routine is not underflow-protected but any variable can be
             put to 0 upon underflow;
            
             The routine is overflow-protected: Matpack::Error() is called.
            
             References:
            
             (1) G.P.M. Poppe, C.M.J. Wijers; More Efficient Computation of
                 the Complex Error-Function, ACM Trans. Math. Software,
                 Vol. 16, no. 1, pp. 47.
             (2) Algorithm 680, collected algorithms from ACM.
            
             The Fortran source code was translated to C++ by B.M. Gammel
             and added to the Matpack library, 1992.
            
             Last change: B. M. Gammel, 18.03.1996 error handling

z : Complex

The function argument.

bDebug : bool

If true, an exception is thrown if serious errors occur. If false, NaN is returned on errors.

Returns: Complex

The faddeeva function w(z).

ErrorFunction.InverseErf(y)

Full Usage: ErrorFunction.InverseErf(y)

Parameters:
    y : float - Argument.

Returns: float A value x so that Erf(x)==y.

Inverse of the error function Erf(x).

y : float

Argument.

Returns: float

A value x so that Erf(x)==y.

ErrorFunction.QuantileOfNormalDistribution01(y)

Full Usage: ErrorFunction.QuantileOfNormalDistribution01(y)

Parameters:
    y : float -

Returns: float

Quantile of the normal distribution function NormalDistribution[0,1].

Adopted from Cephes library; Cephes name: ndtri

y : float

Returns: float