Rounding number without impacting result accuracy

The problem: If you do log1000 the result you will get is 2.9999999999999996 rather than 3 or
0.1 + 0.2 = 0.30000000000000004.

I tried to...