def distance_difference_calc(r2, s1, gap):
    """
    Computes the necessary distance between mocks given geometrical
    components of the survey.

    Parameters
    -----------
    r2 : `float`

    s1 : `float`

    gap : `float`

    Returns
    ----------
    dist_diff : `float`
    """
    # Converting to floats
    r2  = float(r2)
    s1  = float(s1)
    gap = float(gap)

    dist_diff = (((r2 + gap)**2 - (0.5 * s1)**2)**0.5) - r2

    return dist_diff