Addition in javascript
i am trying to add 2 values in javascript.
if total=81.3 and tempval = 88.6
total = parseFloat(total) + parseFloat(tempval)
the desired o/p should be: 169.9
but the output generated is : 169.8999998
due to this value other values are affected.
what could be the problem??
Please help
|