# erf

The error function.

## Calling Sequence

    y = erf(x)

## Arguments

x

  vector or matrix

y

  vector or matrix (of same size than x)

## Description

`erf` computes the error function: \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} dt

## Examples

    deff('y=f(t)','y=exp(-t^2)');
    erf(0.5)-2/sqrt(%pi)*intg(0,0.5,f)

    x = [1+2*%i, -1+2*%i, 1e-6+2e-6*%i,0+2*%i];
    a=erf(x)

    // Equivalent to
    1-erfc(x)

## Algorithms

This function is based on the Faddeeva package library.

## See Also

- calerf
- cdfnor
- erfc
- erfcx
- erfinv

## History

5.5.0
Function erf supports complex arguments