def infer_separation_gain3(distance: float) -> float:
    """Compute separation gain from desired distance
    Args:
        distance: Desired minimum inter-agent distance
    Returns:
        separation_gain: Separation gain to produce (at least) the desired distance
    Note: This is the analytical equilibrium distance of the Reynolds equations for N = 3
    """
    return distance ** 2 / 2