def parabolic_interpolation(signal, tau):
    """Parabolic Interpolation on tau.  Step 5 in `YIN`_.
        
        Args:
            signal (:obj:`numpy.array(float)`): A small piece normalised self correlated audio d'(t, tau) processed by normalisation(). 1D array.
            tau (int): Estimated thresholdeshold.
        
        Returns:
            float: A better estimation of tau.
    """
    
    N, tau = len(signal), int(tau)

    x1 = tau if tau < 1 else tau-1
    x2 = tau if tau+1 >= N/2 else tau+1
    
    if x1 == tau:
        return tau if signal[tau] <= signal[x2] else x2
    elif x2 == tau:
        return tau if signal[tau] <= signal[x1] else x1
    else:
        s0, s1, s2 = signal[x1], signal[tau], signal[x2]
        return tau if 2 * s1 - s2 - s0 == 0 else tau + (s2 - s0) / (2 * (2 * s1 - s2 - s0))