mirror of
https://github.com/josdejong/mathjs.git
synced 2026-02-01 16:07:46 +00:00
Slightly lower the code size for the 2-input gates, to much the flow of the shifts.
This commit is contained in:
parent
632eba954a
commit
50702826df
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user