public XInt PowMod(XInt exp, XInt mod) { var result = new XInt(); mpz_powm(ref result.impl, ref this.impl, ref exp.impl, ref mod.impl); return(result); }
public static XInt GreatestCommonDivisor(XInt x, XInt y) { var z = new XInt(); mpz_gcd(ref z.impl, ref x.impl, ref y.impl); return(z); }
public static XInt PrimeSwingParallelFactorial(Int32 x) { var z = new XInt(); _PrimeSwingParallelFactorial(ref z.impl, (UInt32)x); return(z); }
public static XInt Pow(UInt32 bas, UInt32 exp) { var result = new XInt(); mpz_ui_pow_ui(ref result.impl, bas, exp); return(result); }
public static XInt Sqrt(XInt i) { var result = new XInt(); mpz_sqrt(ref result.impl, ref i.impl); return(result); }
public static XInt Pow(XInt bas, UInt32 exp) { var result = new XInt(); mpz_pow_ui(ref result.impl, ref bas.impl, exp); return(result); }
public static XInt operator /(XInt x, XInt y) { var result = new XInt(); mpz_tdiv_q(ref result.impl, ref x.impl, ref y.impl); return(result); }
public static XInt operator <<(XInt x, Int32 shiftAmount) { var z = new XInt(); mpz_mul_2exp(ref z.impl, ref x.impl, (UInt32)shiftAmount); return(z); }
public static XInt operator *(XInt x, UInt32 y) { var z = new XInt(); mpz_mul_ui(ref z.impl, ref x.impl, y); return(z); }
public static XInt operator +(XInt x, UInt32 y) { var result = new XInt(); mpz_add_ui(ref result.impl, ref x.impl, y); return(result); }
public static XInt operator *(UInt32 x, XInt y) { var z = new XInt(); mpz_mul_ui(ref z.impl, ref y.impl, x); return(z); }
public static XInt operator %(XInt x, XInt mod) { var result = new XInt(); mpz_mod(ref result.impl, ref x.impl, ref mod.impl); return(result); }
public static XInt Factorial(Int32 x) { var z = new XInt(); mpz_fac_ui(ref z.impl, (UInt32)x); return(z); }
public static XInt SchoenhageParallelFactorial(Int32 x) { var z = new XInt(); _SchoenhageParallelFactorial(ref z.impl, (UInt32)x); return(z); }
public bool Equals(XInt other) { if (object.ReferenceEquals(other, null)) { return(false); } return(mpz_cmp(ref other.impl, ref this.impl) == 0); }
public XInt(XInt value) { if (ReferenceEquals(value, null)) { throw new NullReferenceException(); } mpz_init(ref impl); mpz_set(ref impl, ref value.impl); }
public static XInt Pow(XInt bas, Int32 exp) { if (exp == 2) { return(bas * bas); } if (exp >= 0) { return(Pow(bas, (UInt32)exp)); } throw new ArgumentOutOfRangeException(nameof(exp)); }
public XInt PowMod(XInt exp, XInt mod) { var result = new XInt(); mpz_powm(ref result.impl, ref this.impl, ref exp.impl, ref mod.impl); return result; }
public static XInt Pow(UInt32 bas, UInt32 exp) { var result = new XInt(); mpz_ui_pow_ui(ref result.impl, bas, exp); return result; }
public static XInt Pow(XInt bas, Int32 exp) { if (exp == 2) return bas * bas; if (exp >= 0) return Pow(bas, (UInt32)exp); throw new ArgumentOutOfRangeException(nameof(exp)); }
public static XInt Pow(XInt bas, UInt32 exp) { var result = new XInt(); mpz_pow_ui(ref result.impl, ref bas.impl, exp); return result; }
public static XInt Sqrt(XInt i) { var result = new XInt(); mpz_sqrt(ref result.impl, ref i.impl); return result; }
public static XInt operator <<(XInt x, Int32 shiftAmount) { var z = new XInt(); mpz_mul_2exp(ref z.impl, ref x.impl, (UInt32)shiftAmount); return z; }
public static XInt PrimeSwingParallelFactorial(Int32 x) { var z = new XInt(); _PrimeSwingParallelFactorial(ref z.impl, (UInt32)x); return z; }
public static XInt operator +(XInt x, UInt32 y) { var result = new XInt(); mpz_add_ui(ref result.impl, ref x.impl, y); return result; }
public static XInt operator *(XInt x, UInt32 y) { var z = new XInt(); mpz_mul_ui(ref z.impl, ref x.impl, y); return z; }
public static XInt operator *(UInt32 x, XInt y) { var z = new XInt(); mpz_mul_ui(ref z.impl, ref y.impl, x); return z; }
public static XInt operator %(XInt x, XInt mod) { var result = new XInt(); mpz_mod(ref result.impl, ref x.impl, ref mod.impl); return result; }
public bool Equals(XInt other) { if (object.ReferenceEquals(other, null)) return false; return mpz_cmp(ref other.impl, ref this.impl) == 0; }
public Int32 CompareTo(XInt other) { return mpz_cmp(ref impl, ref other.impl); }
public Int32 CompareTo(XInt other) { return(mpz_cmp(ref impl, ref other.impl)); }
public static XInt GreatestCommonDivisor(XInt x, XInt y) { var z = new XInt(); mpz_gcd(ref z.impl, ref x.impl, ref y.impl); return z; }
public static XInt Factorial(Int32 x) { var z = new XInt(); mpz_fac_ui(ref z.impl, (UInt32)x); return z; }
public static XInt operator /(XInt x, XInt y) { var result = new XInt(); mpz_tdiv_q(ref result.impl, ref x.impl, ref y.impl); return result; }
public static XInt SchoenhageParallelFactorial(Int32 x) { var z = new XInt(); _SchoenhageParallelFactorial(ref z.impl, (UInt32)x); return z; }
public XInt(XInt value) { if (ReferenceEquals(value, null)) throw new NullReferenceException(); mpz_init(ref impl); mpz_set(ref impl, ref value.impl); }