You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use this library in the calculator app on Ubuntu Touch.
Under certain conditions (on a Nexus 4/7 with QT 5.3 which is connected via usb to the computer) divisions fails bad (1/3 = 0.3 instead 0.333333, 55/2 = 25). See the original bug to more informations.
We find the bug is caused by timing issue with setting and reading the rem[] array in the do/while cycle in division function.
We fixed in a very symple way, we inverted the adding of next digit to the result array and the update of remainder. See this patch.
Are you interesting to have this change in your code?
I know that is a very specific bug about a certain platform, but can happen also on others platforms.
Hoping to have pleased reporting the bug,
Regards,
Riccardo
The text was updated successfully, but these errors were encountered:
On Wed, Jul 02, 2014 at 12:04:15PM -0700, Michael M wrote:
I'd like to help but the bug does not seem to be in this library so it doesn't seem appropiate to apply the fix here. Doing so would only serve to hide its real origin whatever that may be.
Yes, I agree with you on that, but I think it's right to let you know :-)
Perhaps you are right when you suggest that "the bug is in the QT 5.3 Javascript Interpreter". If so, I am sure they would appreciate you getting to the bottom of it ;)
I'm working with our team to understand the bug and report it upstream, if
necessary
Incidentally, you may find decimal.js to be more suited to a calculator application.
Thanks for the information, I'll definitely take a look to it!
We use this library in the calculator app on Ubuntu Touch.
Under certain conditions (on a Nexus 4/7 with QT 5.3 which is connected via usb to the computer) divisions fails bad (1/3 = 0.3 instead 0.333333, 55/2 = 25). See the original bug to more informations.
We find the bug is caused by timing issue with setting and reading the rem[] array in the do/while cycle in division function.
We fixed in a very symple way, we inverted the adding of next digit to the result array and the update of remainder. See this patch.
Are you interesting to have this change in your code?
I know that is a very specific bug about a certain platform, but can happen also on others platforms.
Hoping to have pleased reporting the bug,
Regards,
Riccardo
The text was updated successfully, but these errors were encountered: