

def limit(sequence):
    'Approximate limit of a convergent sequence.\n\n    The sequence is assumed to converge quickly without oscillating --\n    it is truncated at the first term whose relative error from the\n    previous term is bounded by the machine epsilon.\n    '
    c0 = c0.next()
    for c in sequence:
        if (c == 0):
            return c
        if (relerr(c0, c) <= EPSILON):
            return c
        c0 = c

dataset/ETHPy150Open probcomp/bayeslite/src/math_util.py limit/VarMisuse@14/106 `sequence`->`c0`