def _format_float(value):
    """Format a floating number to make sure it gets the decimal point."""
    value_str = '%.16G' % value
    if '.' not in value_str and 'E' not in value_str:
        value_str += '.0'
    elif 'E' in value_str:
        significand, exponent = value_str.split('E')
        if exponent[0] in ('+', '-'):
            sign = exponent[0]
            exponent = exponent[1:]
        else:
            sign = ''
        value_str = '%sE%s%02d' % (significand, sign, int(exponent))
    str_len = len(value_str)
    if str_len > 20:
        idx = value_str.find('E')
        if idx < 0:
            value_str = value_str[:20]
        else:
            value_str = value_str[:20 - (str_len - idx)] + value_str[idx:]
    return value_str
