code: def float16(val):
      
      # Fraction is 10 LSB, Exponent middle 5, and Sign the MSB
      frac = val & 0x03ff
      exp = (val >> 10) & 0x1F
      sign = val >> 15
  
      if exp:
          value = 2 ** (exp - 16) * (1 + float(frac) / 2**10)
      else:
          value = float(frac) / 2**9
  
      if sign:
          value *= -1
  
      return value
docs: Convert a 16-bit floating point value to a standard Python float.