code: def erfc(
      x: paddle.Tensor, /, *, out: Optional[paddle.Tensor] = None
  ) -> paddle.Tensor:
      any_input_is_scalar = _is_scalar(x)
      if str(x.dtype) not in ["paddle.float32", "paddle.float64"]:
          raise ValueError("Input must be of type float32 or float64.")
  
      abs_x = paddle.abs(x)
      z = paddle.exp(-x * x)
  
      pp = _EvaluatePolynomial(abs_x, kErfcPCoefficient)
      pq = _EvaluatePolynomial(abs_x, kErfcQCoefficient)
      pr = _EvaluatePolynomial(abs_x, kErfcRCoefficient)
      ps = _EvaluatePolynomial(abs_x, kErfcSCoefficient)
  
      abs_x_small = abs_x < 8.0
      y = paddle.where(abs_x_small, z * pp / pq, z * pr / ps)
      result_no_underflow = paddle.where(x < 0.0, 2.0 - y, y)
  
      def is_pos_inf(op):
          return paddle.logical_and(paddle.isinf(op), op > 0)
  
      underflow = paddle.logical_or(
          z == 0,
          paddle.logical_or(
              paddle.logical_and(is_pos_inf(pq), abs_x_small),
              paddle.logical_and(
                  is_pos_inf(ps), paddle.logical_not(abs_x_small)
              ),
          ),
      )
      result_underflow = paddle.where(
          x < 0, paddle.full_like(x, 2), paddle.full_like(x, 0)
      )
  
      result = paddle.where(
          underflow, result_underflow, result_no_underflow
      )
      if any_input_is_scalar:
          result = paddle.squeeze(result, axis=-1)
  
      return result
  
imports: import operator
  from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import paddle
  from ivy.utils.exceptions import IvyNotImplementedException
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes, with_unsupported_dtypes
  import ivy.functional.backends.paddle
  import ivy
  from ivy import promote_types_of_inputs
  from ivy.functional.backends.paddle.elementwise import _elementwise_helper
  from ..None import backend_version
label_desc: Use image node_id 30 for calling a global function with example usage: erfc() and returns: result, paddle