def compare_with_tolerance(base,num,tolerance):
    """ Compare two numbers and allow some tolerance in the deviation

    base : float ; the known truth value
    num : float ; the value obtained from the test run
    tolerance : float ; the permissible deviation from base
    """

    return abs(base - num)/(base) <= tolerance