> countPS should be int, right?

count_ps was intended to be a double.

> also, we should test with different values of countPS for each rollup.

I had a hard enough time keeping the math straight for everything else. :)