Slightly lower the code size for the 2-input gates, to much the flow of the shifts.

This commit is contained in:
Favian Contreras 2014-12-09 22:11:24 -08:00
parent 632eba954a
commit 50702826df
3 changed files with 3 additions and 18 deletions

View File

@ -67,12 +67,7 @@ module.exports = function (math, config) {
}
if (x instanceof BigNumber) {
// try to convert to big number
if (isNumber(y)) {
y = BigNumber.convert(y);
}
if (y instanceof BigNumber) {
if (isNumber(y) || y instanceof BigNumber) {
return x.and(y);
}

View File

@ -68,12 +68,7 @@ module.exports = function (math, config) {
}
if (x instanceof BigNumber) {
// try to convert to big number
if (isNumber(y)) {
y = BigNumber.convert(y);
}
if (y instanceof BigNumber) {
if (isNumber(y) || y instanceof BigNumber) {
return x.or(y);
}

View File

@ -68,12 +68,7 @@ module.exports = function (math, config) {
}
if (x instanceof BigNumber) {
// try to convert to big number
if (isNumber(y)) {
y = BigNumber.convert(y);
}
if (y instanceof BigNumber) {
if (isNumber(y) || y instanceof BigNumber) {
return x.xor(y);
}