windowed: move to a more numerically stable variance calculation