Complementary error function

### 6.3.12 Complementary error function

The complementary error function is defined by

erfc(x)= |
2
√ |
π
| ∫ |
+∞
x
| e−t2dt=1−erf(x).

Hence erfc(0)=1, since

| ∫ |
+∞
0
| e−t2dt= |
√ |
π
2
| .

The erfc command computes the complementary error function.

- erfc takes a, a number.
- erfc(a) returns the value of the complementary error function erfc(a).

#### Examples

erfc(1)

1−erf | ⎛ ⎝ | 1 | ⎞ ⎠

1-erfc(1/(sqrt(2)))*0.5

0.841344746069 |  |  |  |  |  |  |  |  |  |

##### Remark.

The relation between erfc and normal_cdf (see Section 18.4.7) is:

normal_cdf(x) =1− |
1
2
| erfc | ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ |
x
√ |
2
| ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ | .