code: def _ConvertFloat(value):
    
    if value == 'nan':
      raise ParseError('Couldn\'t parse float "nan", use "NaN" instead.')
    try:
      # Assume Python compatible syntax.
      return float(value)
    except ValueError:
      # Check alternative spellings.
      if value == _NEG_INFINITY:
        return float('-inf')
      elif value == _INFINITY:
        return float('inf')
      elif value == _NAN:
        return float('nan')
      else:
        raise ParseError('Couldn\'t parse float: {0}.'.format(value))
docs: Convert an floating point number.