def luhn10(number):

    sum = 0
    while number:
        r = number % 100
        number //= 100
        z = r % 10
        r = r // 10 * 2
        sum += r // 10 + r % 10 + z

    return 0 == sum % 10
This routine applies the convergence acceleration to the list of partial sums.
dataset/ETHPy150Open jek/flatland/flatland/util/base.py/luhn10--crossover with--dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/calculus/extrapolation.py/levin_class.update_psum