ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #01848
[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-wrong-calculations into lp:ubuntu-calculator-app
Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-wrong-calculations into lp:ubuntu-calculator-app.
Commit message:
Fix for wrong calculation issue:
https://github.com/MikeMcl/decimal.js/issues/15
Requested reviews:
Ubuntu Calculator Developers (ubuntu-calculator-dev)
Related bugs:
Bug #1450172 in Ubuntu Calculator App: "Some formulas are wrongly calculated"
https://bugs.launchpad.net/ubuntu-calculator-app/+bug/1450172
For more details, see:
https://code.launchpad.net/~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-wrong-calculations/+merge/257813
Add quick fix for wrong calculation issue:
https://github.com/MikeMcl/decimal.js/issues/15
--
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-wrong-calculations into lp:ubuntu-calculator-app.
=== modified file 'app/engine/math.js'
--- app/engine/math.js 2015-04-10 14:50:44 +0000
+++ app/engine/math.js 2015-04-29 19:44:52 +0000
@@ -35236,8 +35236,10 @@
}
for ( b -= LOGBASE; i < b; ) {
- x['c'].push( +n.slice( i, i += LOGBASE ) );
- }
+ var next = i + LOGBASE;
+ x['c'].push( +n.slice( i, next ) );
+ i = next;
+ }
n = n.slice(i);
i = LOGBASE - n.length;
Follow ups