Did some unit tests, conclusion is that the maths is correct. Using floor accounts for -0. Float however can only be used to a small extent.