JavaScript Rounding Error

Avatar

Avatar

AndyAmmoMorris

Avatar

AndyAmmoMorris

AndyAmmoMorris

08-01-2013

I have the following: DueEmployee.rawValue = (Math.round((((TotalPaidEmployee.rawValue - Advance.rawValue)*100)))/100). When the input to this is 17.205, I am getting 17.20 instead of 17.21. The function seems to be working fine for the rest of the values.

Some specifics on the fields the Data Pattern is set to num{($z,zzz,zz9.999)}  on the TotalPaidEmployee and on the Advance is set to num{($z,zzz,zz9.99)}

View Entire Topic

Avatar

Avatar

Francis_Manly-E

Avatar

Francis_Manly-E

Francis_Manly-E

08-01-2013

Please the formcalc round function discussed in this thread:

http://forums.adobe.com/thread/1130857?tstart=0