How to solve the round-off Issue?
Problem: When we round off the float value using format$() function it return value have the floating point issue. Example: pprint format$(“10.1″,1.75) ”Return 1.8 pprint format$(“10.1″,1.075) ”Return 1.07 In the above example the first pprint we are round 2 decimal points of 1.75 value using format$() function return 1.8 correct value, but the same format$() function is used to round off 2 decimal points of 1.075 return 1.07 wrong values , correct value is 1.08 . This is sample .01 floating point issue . Work-Around: When we are getting Floating issue, Please Use the following function behalf of use format$() function . It return the correct values. Function Call pprint FormatCurrency$(“10.1″,1.075) ”Return 1.08 Function Definition functionS FormatCurrency$(DimF Val) FormatCurrency$=format$(“10.2”,ROUND((val*1000)/10)/100) end function Note: This is not an VM Issue because we tried the same thing in C++ the same result we are getting .