Skip to main content
Navigator | Tier 3
January 13, 2022
Question

****BUG**** Math multiplication has some serious issues!

  • January 13, 2022
  • 12 replies
  • 364 views

image (5)In the following situation, the number variable when set to 2.28 is indeed 2.28 but when multiplying by 100 (specifically 2.28*100), the result is 227.999999999997. Then when converting to a string, the result is 227. This caused a serious issue with a production bot today.

12 replies

Micah.Smith
Automation Anywhere Team
Automation Anywhere Team
February 11, 2022

An upgrade would be the recommended action. That is the "patching of older versions". You're enough behind that moving up to something like .23 will gain you a lot, and its been pretty battle tested in that major issues are reported on it, so it shouldn't be bad from a deployment perspective.

 

Given I cant really replicate/test this, my only other suggestion would be to try the math package from bot store, or do the calculation in JavaScript/Python...though I'm less excited about those last two suggestions.

jimfrost
Navigator | Tier 3
February 14, 2022

Thanks @MICAH SMITH​ we will try to schedule upgrades for the affected client's ASAP. We will have to do a JS/Python work-around temporarily to keep things progressing.