code: def float_encode(self, value):
      
      if value < 128:
        code = value
      elif value > 31743:
        code = 255
      else:
        exp=0
        value>>=3
        while(value>31):
          exp+=1
          value>>=1
        exp<<=4
        code = 0x80 | exp | (value & 0x0F)
      return code
docs: Convert the integer value to its IGMPv3 encoded time value if needed.
     
      If value < 128, return the value specified. If >= 128, encode as a floating 
      point value. Value can be 0 - 31744.