erfc
Complementary error function.
Category: Mathematics > Elementary Math
Syntax
Y = erfc(X)
Returns 1 - erf(X) for each element of X, computed accurately.
Description
erfc(x) equals 1 - erf(x), but it is computed without subtraction, so it keeps full precision for large x, where erf(x) is so close to 1 that the difference would lose all digits. The values go from 2 at -Inf to 0 at Inf, and erfc(0) is 1. It gives tail probabilities of the normal distribution.
Input arguments
X- Real numeric array of any size.
Output arguments
Y- Array of the same size as
X.
Example
Precision for large arguments
erfc([0 1 Inf])
1 - erf(6)
erfc(6)
Output
ans = 1×3
1.0000 0.1573 0
ans = 0
ans = 2.1520e-17