def greater_difference(min_num, val, max_num):
    """returns the greater difference between a value
    and two numbers

    :param
        min_num (int) : a number to check
        val (int) : the number to compare to other params
        max_num (int) : a number to check
    :return
        absolute value of greatest difference between two compared numbers"""
    if abs(max_num - val) > abs(min_num - val):
        return abs(max_num - val)
    else:
        return abs(min_num - val)