Chapter 9: Special Functions

erf

Evaluates the real error function erf(x).

Synopsis

#include <imsl.h>

float imsl_f_erf (float x)

The type double procedure is imsl_d_erf.

Required Arguments

float x   (Input)
Point at which the error function is to be evaluated.

Return Value

The value of the error function erf(x).

Description

The error function erf(x) is defined to be

All values of x are legal.

 

Figure 9- 1   Plot of erf(x)

Example

Evaluate the error function at x = 12.

#include <imsl.h>

main()
{
    float       x = 0.5;
    float       ans;

    ans = imsl_f_erf(x);
    printf("erf(%f) = %f\n", x, ans);
}

Output

erf(0.500000) = 0.520500


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260