public int CompareTo(BigDec that) { if (this.mantissa == that.mantissa && this.exponent == that.exponent) { return(0); } else { BigDec d = this - that; return(d.IsNegative ? -1 : 1); } }
public static BigFloat FromBigDec(BigDec v, int significandSize, int exponentSize) { return(new BigFloat(v.ToDecimalString(), significandSize, exponentSize)); }
public static BigFloat FromBigDec(BigDec v) { return(new BigFloat(v.ToDecimalString(), 24, 8)); }
public int CompareTo(BigDec that) { if (this.mantissa == that.mantissa && this.exponent == that.exponent) { return 0; } else { BigDec d = this - that; return d.IsNegative ? -1 : 1; } }
void Dec(out BigDec n) { string s = ""; if (la.kind == 5) { Get(); s = t.val; } else if (la.kind == 6) { Get(); s = t.val; } else SynErr(127); try { n = BigDec.FromString(s); } catch (FormatException) { this.SemErr("incorrectly formatted number"); n = BigDec.ZERO; } }
public static BigFloat FromBigDec(BigDec v, int significandSize, int exponentSize) { return new BigFloat(v.ToDecimalString(), significandSize, exponentSize); }
public static BigFloat FromBigDec(BigDec v) { return new BigFloat(v.ToDecimalString(), 24, 8); }
public LiteralExpr ConstantReal(Microsoft.Basetypes.BigDec value) { return(new LiteralExpr(Token.NoToken, value, Immutable)); }