mindspore.ops.erfc

mindspore.ops.erfc(x)[source]

Computes the complementary error function of x element-wise.

erfc(x)=12π0xet2dt
Parameters

x (Tensor) – The input tensor with a dtype of float16 or float32, its rank should be in [0, 7] inclusive.

Returns

Tensor, has the same shape and dtype as x.

Raises
  • TypeError – If x is not a Tensor.

  • TypeError – If dtype of x is not float16 or float32.

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]