Comparing version 1.2.2 to 1.2.3
@@ -1665,12 +1665,10 @@ // Utils | ||
var uhi = 0; | ||
var hi = 0; | ||
// bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 | ||
var hi; | ||
var lo = 0; | ||
for (var i = 0; i < num.length; i++) { | ||
var w = num.words[i]; | ||
hi += w * 0x40; | ||
hi = w * 0x40; | ||
lo += w * 0x3d1; | ||
hi += (lo / 0x4000000) | 0; | ||
uhi += (hi / 0x4000000) | 0; | ||
hi &= 0x3ffffff; | ||
lo &= 0x3ffffff; | ||
@@ -1681,11 +1679,10 @@ | ||
lo = hi; | ||
hi = uhi; | ||
uhi = 0; | ||
} | ||
// Fast length reduction | ||
if (num.words[num.length - 1] === 0) | ||
if (num.words[num.length - 1] === 0) { | ||
num.length--; | ||
if (num.words[num.length - 1] === 0) | ||
num.length--; | ||
if (num.words[num.length - 1] === 0) | ||
num.length--; | ||
} | ||
return num; | ||
@@ -1692,0 +1689,0 @@ }; |
{ | ||
"name": "bn.js", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Big number implementation in pure javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/bn.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84745
2516