R = erfcx(X)
| Parameter | Description |
|---|---|
| X | a real single or real double scalar, vector, matrix, or multidimensional array. Sparse and complex inputs are not supported. |
| Parameter | Description |
|---|---|
| R | scaled complementary error function values, returned with the same size and floating-point class as X. |
erfcx computes the scaled complementary error function element by element.
The scaled complementary error function is defined as:
$$erfcx(x) = e^{x^2} erfc(x)$$Use erfcx instead of exp(x^2) * erfc(x) for large positive X to avoid underflow, overflow, or loss of accuracy.
For large positive X:
$$erfcx(x) \approx \frac{1}{\sqrt{\pi}x}$$R = erfcx(5)
V = [-Inf -1 0 1 10 Inf];
R = erfcx(V)
M = [-0.5 15; 3.2 1];
R = erfcx(M)
x = 35;
A = exp(x^2) * erfc(x);
B = erfcx(x);
| Version | Description |
|---|---|
| 1.17.0 | initial version |