input: from typing import Union
  
  def convert_sign(x: Union[int, float]) -> Union[int, float]:
      """
      Convert a positive number to negative or vice versa using bitwise NOT operator.
      
      >>> convert_sign(5)
      -5
      >>> convert_sign(-3.5)
      3.5
      >>> convert_sign(0)
      0
      """
      if x > 0:
          return -x
      elif x < 0:
          return abs(x)
      else:
          return x
output:     if isinstance(x, int):
          return ~x + 1
      else:
          return -x if x > 0 else abs(x)