def str2float(s):
    """Convert variable string to float."""
    try:
        return float(s)
    except ValueError:
        significand, exponent = s[:-4], s[-4:]
        return float('{}e{}'.format(significand, exponent))
