Possible Duplicate:
Is JavaScript's Math broken?
I'm calculating the sum of several float values using javascript and... I've noticed a strange thing never seen before. Executing this code:
parseFloat('2.3') + parseFloat('2.4')
I obtain 4.699999999999999
So... what sould I do to obtain a correct value? (supposed that this is incorrect...)
This question is related to
javascript
math
floating-point
(parseFloat('2.3') + parseFloat('2.4')).toFixed(1);
its going to give you solution i suppose
Source: Stackoverflow.com