mindspore.ops.erfc
- mindspore.ops.erfc(input)[source]
Computes the complementary error function of input element-wise.
\[erfc(x) = 1 - \frac{2} {\sqrt{\pi}} \int\limits_0^{x} e^{-t^{2}} dt\]- Parameters
input (Tensor) –
The input tensor of the complementary error function, \(x\) in the above formula. Supported dtypes:
Ascend: float16, float32.
GPU/CPU: float16, float32, float64.
- Returns
Tensor, has the same shape and dtype as input.
- Raises
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> 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]