For chunk computations that might overflow ints, use double instead of
float.