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