rounding error in loop