swtiching to Kahan sum algorithm for whole-domain summations