erfc - C math.h

C examples for math.h:erfc

Type

function

From

<cmath>
<ctgmath>
<math.h>

Description

Compute complementary error function

The complementary error function is equivalent to: erfc(x) = 1-erf(x)

Prototype

long double erfcl (long double x);
long double erfc (long double x);
     double erfc  (double x);
      float erfcf (float x);
      float erfc (float x);
     double erfc (T x);           

Parameters

Parameter Description
x Parameter for the complementary error function.

Return Value

Complementary error function value for x.

Example

Demo Code

#include <stdio.h>
#include <math.h> /* erfc */

int main ()/*from  www .  j  a v  a 2s  .  c o m*/
{
  double param = 1.0;
  double result = erfc (param);
  printf ("erfc(%f) = %f\n", param, result );
  return 0;
}

Related Tutorials