/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }
/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }
/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }
/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }
/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }
/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }
/** @see BigInteger#andNot(BigInteger) */ static BigInteger andNot(BigInteger val, BigInteger that) { if (that.sign == 0 ) { return val; } if (val.sign == 0) { return BigInteger.ZERO; } if (val.equals(BigInteger.MINUS_ONE)) { return that.not(); } if (that.equals(BigInteger.MINUS_ONE)){ return BigInteger.ZERO; } //if val == that, return 0 if (val.sign > 0) { if (that.sign > 0) { return andNotPositive(val, that); } else { return andNotPositiveNegative(val, that); } } else { if (that.sign > 0) { return andNotNegativePositive(val, that); } else { return andNotNegative(val, that); } } }