implement Kahan summation in Cython