public virtual mpf Sqrt() { var f = new mpf(precision: Precision); mpir.mpf_sqrt(f, this); return(f); }
public static mpf Sqrt(uint x) { var f = new mpf(precision: DefaultPrecision); mpir.mpf_sqrt_ui(f, x); return(f); }
public virtual mpf MultiplyBy2Exp(uint x) { var f = new mpf(precision: Precision); mpir.mpf_mul_2exp(f, this, x); return(f); }
public virtual mpf DivideBy2Exp(uint x) { var f = new mpf(precision: Precision); mpir.mpf_div_2exp(f, this, x); return(f); }
public static mpf GetBiasedRandomBits(randstate state, long maxSize, long exp) { var f = new mpf(precision: DefaultPrecision); mpir.mpf_rrandomb(f, state, maxSize, exp); return(f); }
public virtual mpf Power(uint exponent) { var f = new mpf(precision: Precision); mpir.mpf_pow_ui(f, this, exponent); return(f); }
public virtual mpf DivideFrom(mpf x) { var f = new mpf(precision: Math.Max(Precision, x.Precision)); mpir.mpf_div(f, x, this); return(f); }
public virtual mpf Trunc() { var f = new mpf(precision: Precision); mpir.mpf_trunc(f, this); return(f); }
public virtual mpf SubtractFrom(uint x) { var f = new mpf(precision: Precision); mpir.mpf_ui_sub(f, x, this); return(f); }
public virtual mpf Multiply(mpf x) { var f = new mpf(precision: Math.Max(Precision, x.Precision)); mpir.mpf_mul(f, this, x); return(f); }
public virtual mpf SubtractFrom(mpf x) { var f = new mpf(precision: Math.Max(Precision, x.Precision)); mpir.mpf_sub(f, x, this); return(f); }
public virtual mpf Subtract(uint x) { var f = new mpf(precision: Precision); mpir.mpf_sub_ui(f, this, x); return(f); }
public virtual mpf Add(uint x) { var f = new mpf(precision: Precision); mpir.mpf_add_ui(f, this, x); return(f); }
public virtual mpf Add(mpf x) { var f = new mpf(precision: Math.Max(Precision, x.Precision)); mpir.mpf_add(f, this, x); return(f); }
public virtual mpf DivideFrom(uint x) { var f = new mpf(precision: Precision); mpir.mpf_ui_div(f, x, this); return(f); }
public virtual mpf Floor() { var f = new mpf(precision: Precision); mpir.mpf_floor(f, this); return(f); }
public virtual mpf Abs() { var f = new mpf(precision: Precision); mpir.mpf_abs(f, this); return(f); }
public static mpf GetUniformlyDistributedRandomBits(randstate state, ulong nbits) { var f = new mpf(precision: Math.Max(DefaultPrecision, nbits)); mpir.mpf_urandomb(f, state, nbits); return(f); }
public virtual mpf Ceil() { var f = new mpf(precision: Precision); mpir.mpf_ceil(f, this); return(f); }
public virtual mpf Negate() { var f = new mpf(precision: Precision); mpir.mpf_neg(f, this); return(f); }
public virtual mpf RelativeDifference(mpf other) { var f = new mpf(precision: Math.Max(Precision, other.Precision)); mpir.mpf_reldiff(f, this, other); return(f); }
public int CompareTo(mpf other) { return(CompareTo(other.ToMpq())); }
public bool Equals(mpf other) { return(!ReferenceEquals(other, null) && Equals(other.ToMpq())); }
public mpq(mpf op) : this() { mpir.mpq_set_f(this, op); mpir.mpq_canonicalize(this); }
public static int Compare(double x, mpf y) { return(-y.CompareTo(x)); }
public static int Compare(mpf x, double y) { return(x.CompareTo(y)); }
public static int Compare(uint x, mpf y) { return(-y.CompareTo(x)); }
public static int Compare(mpf x, uint y) { return(x.CompareTo(y)); }
public int CompareTo(mpf other) { return(Math.Sign(mpir.mpf_cmp(this, other))); }
public bool Equals(mpf other, ulong bits) { return(!ReferenceEquals(other, null) && (ReferenceEquals(this, other) || (mpir.mpf_eq(this, other, bits) != 0))); }