Evaluates the real error function erf(x).
#include <imsl.h>
float imsl_f_erf (float x)
The type double procedure is imsl_d_erf.
float x
(Input)
Point at which the error function is to be evaluated.
The value of the error function erf(x).
The error function erf(x) is defined to be

All values of x are legal.

Figure 9- 1 Plot of erf(x)
Evaluate the error function at x = 1∕2.
#include
<imsl.h>
main()
{
float x = 0.5;
float ans;
ans =
imsl_f_erf(x);
printf("erf(%f) = %f\n", x, ans);
}
erf(0.500000) = 0.520500
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |