def get_float_from_config(config, section, key, default=None):
    """
    Get a value from the config if it exists, otherwise return the default value
    :param config: The configuration to get the value from
    :param section: The section to get the value from
    :param key: The key that may or may not exist
    :param default: The default value to return, which is None by default
    :return: The value if it exists, else default
    """
    if config.has_option(section, key):
        return config.getfloat(section, key)
    else:
        return default