code: def entropy_bits_nrange(
          minimum: Union[int, float], maximum: Union[int, float]
  ) -> float:
      
      # Shannon:
      # d = fabs(maximum - minimum)
      # ent = -(1/d) * log(1/d, 2) * d
      # Aprox form: log10(digits) * log2(10)
      if not isinstance(minimum, (int, float)):
          raise TypeError('minimum can only be int or float')
      if not isinstance(maximum, (int, float)):
          raise TypeError('maximum can only be int or float')
      if minimum < 0:
          raise ValueError('minimum should be greater than 0')
      if maximum < 0:
          raise ValueError('maximum should be greater than 0')
  
      dif = fabs(maximum - minimum)
      if dif == 0:
          return 0.0
  
      ent = log10(dif) * 3.321928
      return ent
docs: Calculate the number of entropy bits in a range of numbers.