# erf, erfc, erfcx

## Purpose

Error functions.

## Synopsis

    y = erf(x)
    y = erfc(x)
    y = erfcx(x)

## Description

`y = erf(x)`, the error function, is the integral of the Gaussian distribution function from `0` to `x`:

`y = erfc(x)` returns the value of the complementary error function:

`y = erfcx(x)` returns the value of the scaled complementary error function:

For large `x`,`erfcx(x)` is approximately

## Algorithm

The MATLAB code is a translation of a FORTRAN program by W. J. Cody, Argonne National Laboratory, NETLIB/SPECFUN, March 19, 1990. The main computation evaluates near-minimax rational approximations from "Rational Chebyshev Approximations for the Error Function" by W. J. Cody, Math. Comp., 1969, pgs. 631-638.

## See Also

    erfinv

(c) Copyright 1994 by The MathWorks, Inc.