Yann, I am still pretty much positive this is a consequence of using floating point numbers.

I believe it is commonly understood that using == with floats and doubles is a bad practice.* Which means you cannot really expect a set of complex calculations to == 6.0, even if that is the mathematically correct answer.

Someone will contradict me here if I'm wrong.

*it's OK to use floats, just don't use == with them