def gaspari_cohn_mid(z,c):
    """
    Gaspari-Cohn correlation function for middle distances (between c and 2*c)
    
    Arguments:
    - z: Points to be evaluated
    - c: Cutoff value
    """
    return 1./12*(z/c)**5 - 0.5*(z/c)**4 + 5./8*(z/c)**3 \
        + 5./3*(z/c)**2 - 5*z/c - 2./3*c/z + 4