Comparing version 1.0.0-alpha5 to 1.0.0-alpha6
15
index.js
@@ -65,17 +65,4 @@ 'use strict'; | ||
const hi = (Math.imul(selfHi, otherLo) + Math.imul(otherHi, selfLo)) | 0; | ||
let carry = ((selfLo * otherLo) * (1 / 0x100000000)) | 0; | ||
let carry = (((selfLo >>> 0) * (otherLo >>> 0)) * (1 / 0x100000000)) | 0; | ||
const selfSign = selfLo >> 31; | ||
const otherSign = otherLo >> 31; | ||
const selfPositive = ~selfSign & (~(~selfLo & (selfLo - 1)) >> 31); | ||
const otherPositive = ~otherSign & (~(~otherLo & (otherLo - 1)) >> 31); | ||
// If both negative | ||
carry = (carry + (selfSign & otherSign & (otherLo + selfLo))) | 0; | ||
// If `self < 0` & `other > 0` | ||
carry = (carry + (selfSign & otherPositive & (otherLo - 1))) | 0; | ||
// If `self > 0` & `other < 0` | ||
carry = (carry + (selfPositive & otherSign & (selfLo - 1))) | 0; | ||
this.hi = (hi + carry) | 0; | ||
@@ -82,0 +69,0 @@ this.lo = Math.imul(selfLo, otherLo) | 0; |
{ | ||
"name": "awesome64", | ||
"version": "1.0.0-alpha5", | ||
"version": "1.0.0-alpha6", | ||
"description": "Awesome Int64 num implementation", | ||
@@ -5,0 +5,0 @@ "main": "index.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
9138
250