# Erf

## Erf(x)

The error function, defined as:

$\displaystyle{ Erf(x) = {2\over\sqrt{\pi}} \int_0^x e^{-t^2} dt }$

### Erfc(x)

Some publications use the $\displaystyle{ erfc(x) }$ function, which is defined as 1-Erf(x). A separate Erfc function is not built into Analytica.

### Erfi(x)

Another variation that appears is some publications is the $\displaystyle{ erfi(x) }$ function. Erfi is a real-valued function when «x» is real, and essentially gives the function that appears on the imaginary axis of the complex Erf function. Hence, erfi is equivalent to

-1j * Erf(1j * x)

In practice, the Erfi function grows so quickly that numeric overflow is likely to occur in any algorithms that use it. Hence, it is better to use the Dawson function. The relationship between Erfi and Dawson is given by

$\displaystyle{ erfi(x) = {2\over\sqrt\pi} e^{x^2} D(x) }$

## History

• Starting in Analytica 5.0, the complex error function (i.e, in which the parameter «x» is a complex number) is supported.