erf(3F)

erf, erfc, derf, derfc, erfl, erfcl, qerf, qerfc - Error function and complementary error function

As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.

NAME
     erf, erfc, derf, derfc, erfl, erfcl, qerf, qerfc - Error function and
     complementary error function

SYNOPSIS
     Fortran synopsis:
          real*4 r1, r2, erf
          real*8 dp1, dp2, derf
          real*16 cd1, cd2, qerf

          r2 = erf(r1)
          dp2 = derf(dp1)
          cd2 = qerf(cd1)

          real*4 r1, r2, erfc
          real*8 dp1, dp2, derfc
          real*16 cd1, cd2, qerfc

          r2 = erfc(r1)
          dp2 = derfc(dp1)
          cd2 = qerfc(cd1)

     C synopsis:
          #include <math.h>

          double erf (double x);

          double erfc (double x);

          long double erfl (long double x);

          long double erfcl (long double x);

DESCRIPTION
     The erf intrinsic functions return the error function of x, defined in
     the following:



          (2/sqrt(pi)) integral{0 to x} of (e-t2) dt

     erfc, which returns 1.0 - erf(x), is provided because of the extreme
     loss of relative accuracy if erf(x) is called for large x and the
     result subtracted from 1.0. For example, if x = 10, 12 places are
     lost.

     C/C++: each library contains versions of erf and erfc; however the
     long double-precision routines erfl and erfcl are only available in
     the standard math library, -lm and in -lmx.

RETURN VALUES
     Functions in the standard math library (libm.a) are referred to as
     -lm; versions in the mathx library (libmx.a) are referred to as -lmx,
     and those in the the BSD math library (libm43.a) are referred to as
     -ilm43.

     The -lm and -lmx versions always return the default Quiet NaN and set
     errno to EDOM when a NaN is used as an argument.  A NaN argument
     usually causes the -ilm43 versions to return the same argument.  The
     -ilm43 versions never set errno.

     See matherr(3M) for a description of error handling for -lmx
     functions.

SEE ALSO
     exp(3M), matherr(3M)