public BigInt remainder(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { return(BigInt.valueOf(_lpart % y._lpart)); } return(BigInt.fromBigInteger(this.toBigInteger().Mod(y.toBigInteger()))); }
public BigInt quotient(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { return(BigInt.valueOf(_lpart / y._lpart)); } return(BigInt.fromBigInteger(this.toBigInteger().Divide(y.toBigInteger()))); }
public BigInt add(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { long ret = _lpart + y._lpart; if ((ret ^ _lpart) >= 0 || (ret ^ y._lpart) >= 0) { return(BigInt.valueOf(ret)); } } return(BigInt.fromBigInteger(this.toBigInteger().Add(y.toBigInteger()))); }
public BigInt multiply(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { long ret = _lpart * y._lpart; if (y._lpart == 0 || ret / y._lpart == _lpart) { return(BigInt.valueOf(ret)); } } return(BigInt.fromBigInteger(this.toBigInteger().Multiply(y.toBigInteger()))); }
public BigInt multiply(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { long ret = _lpart * y._lpart; if (y._lpart == 0 || (_lpart != Int64.MinValue && unchecked (ret / y._lpart) == _lpart)) { return(BigInt.valueOf(ret)); } } return(BigInt.fromBigInteger(this.toBigInteger().Multiply(y.toBigInteger()))); }