def abs_diff(a_vec, b_vec):
    """ calculate the absolute difference between two vectors """
    if max(a_vec) > max(b_vec):
        return min(a_vec) - max(b_vec)
    return min(b_vec) - max(a_vec)
