erfc -- Compute the Complementary Error Function

SYNOPSIS

 #include <lcmath.h>

 double erfc(double x);
 

DESCRIPTION

erfc computes the complementary error function of its argument x. The value returned by erfc is defined by this equation:

Note the following:

 erf(x) + erfc(x) = 1
 

RETURN VALUE

erfc returns the complementary error function of its argument.

DIAGNOSTICS

An error message is written to the standard error file (stderr) by the run-time library if x exceeds the value 13.30619656013802. In this case, the function returns 0.0.

If an error occurs in erfc, the _matherr routine is called. You can supply your own version of _matherr to suppress the diagnostic message or modify the value returned.

EXAMPLE

This example computes the complementary error function using erfc:
  #include <stdio.h>
  #include <lcmath.h>

  #define SVECTOR .7854

  main()
  {
     double erfcv;
     erfcv = erfc(SVECTOR);
     printf("erfc(%f) = %fn", SVECTOR, erfcv);
  }

 

RELATED FUNCTIONS

erf, _matherr

SEE ALSO

Mathematical Functions

Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.