diff --git a/bignumber.js b/bignumber.js index e118ba8..5ebb5da 100644 --- a/bignumber.js +++ b/bignumber.js @@ -728,7 +728,7 @@ if ( !d ) { ++e; - xc.unshift(1); + xc = [1].concat(xc); } } } @@ -766,7 +766,7 @@ x[i] = temp % base; } - if (carry) x.unshift(carry); + if (carry) x = [carry].concat(x); return x; } @@ -869,7 +869,7 @@ // Add zeros to make remainder as long as divisor. for ( ; remL < yL; rem[remL++] = 0 ); yz = yc.slice(); - yz.unshift(0); + yz = [0].concat(yz); yc0 = yc[0]; if ( yc[1] >= base / 2 ) yc0++; // Not necessary, but to prevent trial digit n > base, when using base 3. @@ -940,7 +940,7 @@ prodL = prod.length; } - if ( prodL < remL ) prod.unshift(0); + if ( prodL < remL ) prod = [0].concat(prod); // Subtract product from remainder. subtract( rem, prod, remL, base ); @@ -1859,7 +1859,7 @@ } if (a) { - xc.unshift(a); + xc = [a].concat(xc); ++ye; }