Numerically stable algorithm for computing the running mean
nullbuffer.com