public virtual mpq Multiply(mpq x) { var q = new mpq(); mpir.mpq_mul(q, this, x); return(q); }
public virtual mpq MultiplyBy2Exp(uint x) { var q = new mpq(); mpir.mpq_mul_2exp(q, this, x); return(q); }
public virtual mpq Subtract(mpq x) { var q = new mpq(); mpir.mpq_sub(q, this, x); return(q); }
public virtual mpq Negate() { var q = new mpq(); mpir.mpq_neg(q, this); return(q); }
public virtual mpq DivideFrom(mpq x) { var q = new mpq(); mpir.mpq_div(q, x, this); return(q); }
public virtual mpq Divide(mpq x) { var q = new mpq(); mpir.mpq_div(q, this, x); return(q); }
public virtual mpq DivideBy2Exp(uint x) { var q = new mpq(); mpir.mpq_div_2exp(q, this, x); return(q); }
public virtual mpq Inverse() { var q = new mpq(); mpir.mpq_inv(q, this); return(q); }
public virtual mpq Abs() { var q = new mpq(); mpir.mpq_abs(q, this); return(q); }
public virtual mpq Add(mpq x) { var q = new mpq(); mpir.mpq_add(q, this, x); return(q); }
public virtual mpq SubtractFrom(mpq x) { var q = new mpq(); mpir.mpq_sub(q, x, this); return(q); }
public virtual mpq Root(uint n, out bool isExact) { bool isNumExact; bool isDenExact; var ans = new mpq(Numerator.Root(n, out isNumExact), Denominator.Root(n, out isDenExact)); isExact = isNumExact && isDenExact; return(ans); }
public virtual mpq Sqrt(out bool isExact) { bool isNumExact; bool isDenExact; var ans = new mpq(Numerator.Sqrt(out isNumExact), Denominator.Sqrt(out isDenExact)); isExact = isNumExact && isDenExact; return(ans); }
public static int Compare(mpq x, double y) { return(x.CompareTo(y)); }
public override mpq Multiply(mpq x) { mpir.mpq_mul(this, this, x); return(this); }
public mpq(mpq op) : this() { mpir.mpq_set(this, op); }
public override mpq Divide(mpq x) { mpir.mpq_div(this, this, x); return(this); }
public bool Equals(mpq other) { return(!ReferenceEquals(other, null) && Equals(other.ToMpf())); }
public mpf(mpq op, ulong?precision = null) : this(precision : precision) { mpir.mpf_set_q(this, op); }
public int CompareTo(mpq other) { return(CompareTo(other.ToMpf())); }
public override mpq SubtractFrom(mpq x) { mpir.mpq_sub(this, x, this); return(this); }
public static int Compare(mpq x, uint y) { return(x.CompareTo(y)); }
public bool Equals(mpq other) { return(!ReferenceEquals(other, null) && (ReferenceEquals(this, other) || (mpir.mpq_equal(this, other) != 0))); }
public override mpfr Add(mpq x, RoundingMode?roundingMode = null) { mpir.mpfr_add_q(this, this, x, (int)roundingMode.GetValueOrDefault(DefaultRoundingMode)); return(this); }
public int CompareTo(mpq other) { return(Math.Sign(mpir.mpq_cmp(this, other))); }
public xmpq(mpq op) : base(op) { }
public static int Compare(uint x, mpq y) { return(-y.CompareTo(x)); }
public override mpq Add(mpq x) { mpir.mpq_add(this, this, x); return(this); }
public static int Compare(double x, mpq y) { return(-y.CompareTo(x)); }
public mpc(mpq op, long?precision = null, RoundingMode?roundingMode = null) : this(precision : precision) { mpir.mpc_set_q(this, op, (int)roundingMode.GetValueOrDefault(DefaultRoundingMode)); }