This function evaluates the error function.
ERF — Function value. (Output)
X — Argument for which the function value is desired. (Input)
Generic: ERF (X)
Specific: The specific interface names are S_ERF and D_ERF.
Single: ERF (X)
Double: The double precision function name is DERF.
The error function, erf(x), is defined to be
All values of x are legal.
Figure 5- 1 Plot of erf (x)
In this example, erf(1.0) is computed and printed.
USE ERF_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER NOUT
REAL VALUE, X
! Compute
X = 1.0
VALUE = ERF(X)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) X, VALUE
99999 FORMAT (' ERF(', F6.3, ') = ', F6.3)
END
ERF( 1.000) = 0.843
PHONE: 713.784.3131 FAX:713.781.9260 |