Calculation accuracy
-
- Posts: 6
- Joined: Tue Oct 10, 2017 12:44 pm
Calculation accuracy
The calculation of ((1-.08)/.08)*100 should equal 1150 and does when entered in a test calculated field. However, when calculated fields that have these values are used in this equation, e.g., ((var1-var2)/var2)*100 the result is 1100.____It may be a problem of rounding in the caluclated values in var1 and var2, but is there a way to force an accurate calculation to 2 decimals so it would not lose the 50 points? ____I tried round() with 2 decimals and still get 1100.00____Am using 8.0.____Thanks
=> RE: Calculation accuracy
Try__round((round(var1,2)-round(var2,2))/round(var2,2)*100 ,2)____Kathleen__R&R Support
-
- Posts: 6
- Joined: Tue Oct 10, 2017 12:44 pm
==> RE: Calculation accuracy
Thanks, Kathleen____I played around with the equations some more and figured out you must round every part of the equation and the answer comes out correct - just as you indicated in your post. Makes sense.____Rick