IMSL C Math Library
erfc
Evaluates the real complementary error function erfc(x).
Synopsis
#include <imsl.h>
float imsl_f_erfc (float x)
The type double procedure is imsl_d_erfc.
Required Arguments
float x (Input)
Point at which the complementary error function is to be evaluated.
Return Value
The value of the complementary error function erfc(x).
Description
The complementary error function erfc(x) is defined to be
The argument x must not be so large that the result underflows. Approximately, x should be less than
where s is the smallest representable floating-point number.
Figure 9.9 — Plot of erfc(x)
Example
Evaluate the error function at x = 1/2.
 
#include <imsl.h>
#include <stdio.h>
 
int main()
{
float x = 0.5;
float ans;
 
ans = imsl_f_erfc(x);
printf("erfc(%f) = %f\n", x, ans);
}
Output
 
erfc(0.500000) = 0.479500
Alert Errors
IMSL_LARGE_ARG_UNDERFLOW
The argument x is so large that the result underflows.