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