Computes the error function value of vector elements.
FORTRAN:
call vserf( n, a, y )
call vmserf( n, a, y, mode )
call vderf( n, a, y )
call vmderf( n, a, y, mode )
C:
vsErf( n, a, y );
vmsErf( n, a, y, mode );
vdErf( n, a, y );
vmdErf( n, a, y, mode );
Name |
Type |
Description |
---|---|---|
n |
FORTRAN 77: INTEGER Fortran 90: INTEGER, INTENT(IN) C: const int |
Specifies the number of elements to be calculated. |
a |
FORTRAN 77: REAL for vserf, vmserf DOUBLE PRECISION for vderf, vmderf Fortran 90: REAL, INTENT(IN) for vserf, vmserf DOUBLE PRECISION, INTENT(IN) for vderf, vmderf C: const float* for vsErf, vmsErf const double* for vdErf, vmdErf |
FORTRAN: Array, specifies the input vector a. C: Pointer to an array that contains the input vector a. |
mode |
FORTRAN 77: INTEGER*8 Fortran 90: INTEGER(KIND=8), INTENT(IN) C: const MKL_INT64 |
Overrides global VML mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
---|---|---|
y |
FORTRAN 77: REAL for vserf, vmserf DOUBLE PRECISION for vderf, vmderf Fortran 90: REAL, INTENT(OUT) for vserf, vmserf DOUBLE PRECISION, INTENT(OUT) for vderf, vmderf C: float* for vsErf, vmsErf double* for vdErf, vmdErf |
FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y. |
The Erf function computes the error function values for elements of the input vector a and writes them to the output vector y.
The error function is defined as given by:
Useful relations:
where erfc is the complementary error function.
where
is the cumulative normal distribution function.
where Φ-1(x) and erf-1(x) are the inverses to Φ(x) and erf(x) respectively.
The following figure illustrates the relationships among Erf family functions (Erf, Erfc, CdfNorm).
Useful relations for these functions: