def METHOD_NAME(expected, actual, tolerance):
    max_diff = round(float(expected) * tolerance / 100)
    if max_diff == 0 and tolerance != 0:
        max_diff = 1
    low = expected - max_diff
    high = expected + max_diff
    if high >= actual >= low:
        return 0
    else:
        return -1