Question: I am working in JavaScript, but the problem is generic. Take this rounding error:

```
>> 0.1 * 0.2
0.020000000000000004

```

[This StackOverflow answer](https://stackoverflow.com/a/588019) provides a nice explanation. Essentially, certain decimal numbers cannot be represented as precisely in binary. This is intuitive, since 1/3 has a similar problem in base-10. Now a work around is this:

```
>> (0.1 * (1000*0.2)) / 1000
0.02

```

My question is how does this work?

Answer: 
It doesn't. Try `0.684` and `0.03` instead and this trick actually makes it worse. Or `0.22` and `0.99`. Or a huge number of other things.
Since the numbers are constants, the expression can be evaluated before assigning the numbers to variables, so no float variables need to be used except for the one that stores the result of the expression.