Other answers here have given you a technique. But it's important to mention that not all values can be exactly represented in floating-point. 1.001 is a good example; the nearest possible value is 1.00099999999999988987.
So if your aim is to get strictly 3 decimal places, then the answer is: that's not possible.