From 55a595a880a9622cc9d57fb4796d08bf54c1332c Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Wed, 12 Dec 2012 20:56:55 -0800 Subject: [PATCH] "Fix" multiply by disabling rounding - doesn't seem to produce correct results. --- src/js/amount.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/amount.js b/src/js/amount.js index ff6f5b2437..fa8dac5366 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -845,13 +845,15 @@ Amount.prototype.multiply = function (v) { } // XXX Causes errors + /* v1 = v1.multiply(consts.bi_10).add(new BigInteger("5")); o1 -= 1; v2 = v2.multiply(consts.bi_10).add(new BigInteger("5")); o2 -= 1; + */ result = new Amount(); - result._offset = o1 + o2 + 2; + result._offset = o1 + o2; result._value = v1.multiply(v2); result._is_native = this._is_native; result._is_negative = this._is_negative !== v._is_negative;