def abs_summation(sequence):
    s = sequence.next()
    for t in sequence:
        assert 0 <= t
        s += t
        if (t/s) <= EPSILON:
            return s
Approximate summation of a nonnegative convergent sequence.
dataset/ETHPy150Open probcomp/bayeslite/src/math_util.py/abs_summation