# ERF

## Purpose:

Computes the error function.

## Syntax:

ERF(val)

 val - A scalar, series, or table.

## Returns:

A scalar, series, or table.

## Example:

erf(1)

returns 0.84270079.

## Example:

erf(1 + i)

returns 1.316151 + 0.190453i

## Example:

erfinv(erf(.2))

returns 0.2 indicating that ERF and ERFINV are inverse functions.

## Example:

erf(-2..0.01..2);

xlabel("x");ylabel("erf(x)");label("Error Function");

returns 401 samples of erf(x).

## Remarks:

The error function is defined as:

ERF is computed from the FADDEEVA function based on an algorithm developed by Steven G. Johnson. The Faddeeva function is defined as:

For a series of measurements described by a normal distribution with a standard deviation of σ and mean value of 0:

p is the probability that the error of a single measurement lies between -a and +a, for positive a.

See PROBN for an implementation of the normal probability distribution function.

ERFC

ERFCINV

ERFCX

ERFI

ERFINV