# erfcl Function

Calculates the complementary error function of the argument.

Include

<math.h>

Prototype

long double erfcl(long double x);

Argument

 x upper limit of summation

Return Value

Returns the complementary error function of the argument, being 1 minus the error function of the same argument.

Remarks

A range error occurs if the x is too large and errno will be set to ERANGE.

Example

See the notes at the beginning of this chapter or section for information on using printf() or scanf() (and other functions reading and writing the stdin or stdout streams) in the example code.

#include <math.h>
#include <stdio.h>

int main(void)
{
long double x, y;

x = 0.5;
y = erfcl(x);
printf("The complementary error function from 0 to %Lf is %Lf\n", x, y);

x = -0.75;
y = erfcl(x);
printf("The complementary error function from 0 to %Lf is %Lf\n", x, y);
}

Example Output

The complementary error function from 0 to 0.500000 is 0.479500
The complementary error function from 0 to -0.750000 is 1.711156