View Single Post
  #1 (permalink)  
Old July 14th, 2006, 02:00 AM
m_soni21 m_soni21 is offline
Authorized User
 
Join Date: Jan 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote