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