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 bool lt(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { return(_lpart < y._lpart); } return(this.toBigInteger().CompareTo(y.toBigInteger()) < 0); }
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 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 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 || (_lpart != Int64.MinValue && unchecked (ret / y._lpart) == _lpart)) { return(BigInt.valueOf(ret)); } } return(BigInt.fromBigInteger(this.toBigInteger().Multiply(y.toBigInteger()))); }
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 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())); }
public bool lt(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { return _lpart < y._lpart; } return this.toBigInteger().CompareTo(y.toBigInteger()) < 0; }
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 quotient(BigInt y) { if ((_bipart == null) && (y._bipart == null)) { if (_lpart == Int64.MinValue && y._lpart == -1) return BigInt.fromBigInteger(this.toBigInteger().Negate()); return BigInt.valueOf(_lpart / y._lpart); } return BigInt.fromBigInteger(this.toBigInteger().Divide(y.toBigInteger())); }