def __hyp2f1(c, m, x, tol):
    """ Computes 1/f(P) = hyp2f1(1, -m, N-m, -x).

    c   -- coefficients computed by fe.__hyp2f1_coefficients.
    m   -- a positive integer.
    x   -- a real number.
    tol -- error tolerance.
    """
    h1 = 1.0
    mlt = x
    k = 1
    while True:
        u = c[k] * mlt
        h1 += u
        if k == m or abs(u / h1) <= tol:
            break
        k += 1
        mlt *= x
    return h1
