IceBox Posted July 18, 2006 Report Share Posted July 18, 2006 Hopefully someone can help me here. I have been having a very difficult time figuring out the logic used by Macro Express when rounding. I did read an article in this forum once, as well as the section of Joe's book that discusses "Banker's Rounding", but I don't think that's the issue in this case. No matter what number I try, if I tell Macro Express to round a Decimal Variable to 2 places, it always rounds "5" down. So: 1.755 becomes 1.75 when it should be 1.76 1.765 becomes 1.76 when it should be 1.77 and so on and so on. The only fix I have found is to add .00000001 to the number first, and then round, because, believe it or not.... 1.76500001 gets rounded to 1.77, but 1.765 does not. Am I doing something wrong? Thanks in advance for your help Quote Link to comment Share on other sites More sharing options...
kevin Posted July 18, 2006 Report Share Posted July 18, 2006 Icebox, After doing some testing, it appears to me that there may be a problem with the Round Decimal command. I have entered an issue in our bug reporting and tracking system so we can do some in-depth analysis. Quote Link to comment Share on other sites More sharing options...
IceBox Posted December 13, 2011 Author Report Share Posted December 13, 2011 Was this ever corrected? I received an email today asking me to fix a macro that is not rounding correctly. After testing, I see that the issue is EXACTLY what I described back in 2006. We are currently using Version 3.5.5.2. Was it fixed after this? Quote Link to comment Share on other sites More sharing options...
Samrae Posted December 13, 2011 Report Share Posted December 13, 2011 Looks like that was fixed nearly 5 years ago: 10. Fixed a problem with the Round Decimal Variable command. [iSS3768] Quote Link to comment Share on other sites More sharing options...
IceBox Posted December 13, 2011 Author Report Share Posted December 13, 2011 Thank you! Makes sense. Fixed in 3.6 and we are still using 3.5.5.2. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.