I am doing a very simple formula that does some rounding.
R>SET VAR vUpdateAmount REAL = .01
R>SET VAR vBookListPrice CURRENCY = 3.50
R>SET VAR vBookListPrice2 DOUBLE = NULL
R>SET VAR vBookListPrice2 = .vBookListPrice
R>SET VAR vBookListPrice2 = ((.vBookListPrice2 *
.vUpdateAmount)+.vBookListPrice2)
R>SHO VAR vBookListPrice2
3.5399999921769
R>SET VAR vBookListPrice2 = (ROUND(.vBookListPrice2,2))
R>SHO VAR vBookListPrice2
3.53
If I change vUpdateAmount to a DOUBLE I get the correct results 3.54
Why is that?? Isnt .01 = .01 wheather is a REAL or a DOUBLE?? Could
someone run this a let me know if they get the same results?
R>SET VAR vUpdateAmount DOUBLE = .01
R>SET VAR vBookListPrice CURRENCY = 3.50
R>SET VAR vBookListPrice2 DOUBLE = NULL
R>SET VAR vBookListPrice2 = .vBookListPrice
R>SET VAR vBookListPrice2 = ((.vBookListPrice2 *
.vUpdateAmount)+.vBookListPrice2)
R>SHO VAR vBookListPrice2
3.535
R>SET VAR vBookListPrice2 = (ROUND(.vBookListPrice2,2))
R>SHO VAR vBookListPrice2
3.54
Victor Timmons
Tiz's Door Sales, Inc
425-258-2391