I just found an arithmetic bug that, very simplified, when multiplying two numbers and then dividing, the order of operations give different values!
In this case, multiplying first gives the correct answer:
(1455/1279) * 1279
1455.0000000000002
(1455*1279) / 1279
1455
I can see that the larger numerator might be advantageous, but it too could have problems, overflow for example.
So the question is: why does this occur, and what are the best practices for JavaScript numeric operations?