JavaScript is adding floating point numbers fine.
Probably one of your operands is not a floating point number.
Quote from a JS book: JavaScript has a single number type. Internally, it is represented as 64-bit floating point, the same as Java’s double. Unlike most other programming languages, there is no separate integer type, so 1 and 1.0 are the same value.
I would try to debug the code and then see which values are strings (or not numbers), and then parse them using the parseFloat function.