mindspore.ops.erfc
- mindspore.ops.erfc(x)[source]
Computes the complementary error function of x element-wise.
\[erfc(x) = 1 - \frac{2} {\sqrt{\pi}} \int\limits_0^{x} e^{-t^{2}} dt\]- Parameters
x (Tensor) – The input tensor with a dtype of float16, float32 or float64, its rank should be in [0, 7] inclusive.
- Returns
Tensor, has the same shape and dtype as x.
- Raises
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> x = Tensor(np.array([-1, 0, 1, 2, 3]), mindspore.float32) >>> output = ops.erfc(x) >>> print(output) [1.8427168e+00 1.0000000e+00 1.5728319e-01 4.6912432e-03 2.2351742e-05]