Expand my Community achievements bar.

JavaScript Rounding Error

Avatar

Level 1

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)}

1 Reply