def _hyp2f1_from_coefs(coefs, param1, arg, tol):
    """Computes ``hyp2f1(1, -param1, param2 - param1, -arg)`` using the output from ``_hyp2f1_coefs``."""
    h1 = 1.
    mlt = arg
    k = 1
    while True:
        u = coefs[k] * mlt
        h1 += u
        if k == param1 or abs(u / h1) <= tol:
            break
        k += 1
        mlt *= arg
    return h1