Minimizing overall rounding
Rounding operations, especially in loops, reduce code performance and may have a negative effect on the precision of computations. Consider using double-precision variables instead of single-precision variables when you store the temporary results of single-precision calculations, and delay rounding operations until the final result is computed.