예제 #1
0
파일: BigDec.cs 프로젝트: CrystalMei/boogie
 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);
     }
 }
예제 #2
0
파일: BigFloat.cs 프로젝트: omaragb/tlp182
 public static BigFloat FromBigDec(BigDec v, int significandSize, int exponentSize)
 {
     return(new BigFloat(v.ToDecimalString(), significandSize, exponentSize));
 }
예제 #3
0
파일: BigFloat.cs 프로젝트: omaragb/tlp182
 public static BigFloat FromBigDec(BigDec v)
 {
     return(new BigFloat(v.ToDecimalString(), 24, 8));
 }
예제 #4
0
 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;
       }
 }
예제 #5
0
파일: Parser.cs 프로젝트: qunyanm/boogie
	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;
		}
		
	}
예제 #6
0
파일: BigFloat.cs 프로젝트: qunyanm/boogie
 public static BigFloat FromBigDec(BigDec v, int significandSize, int exponentSize)
 {
   return new BigFloat(v.ToDecimalString(), significandSize, exponentSize);
 }
예제 #7
0
파일: BigFloat.cs 프로젝트: qunyanm/boogie
 public static BigFloat FromBigDec(BigDec v)
 {
   return new BigFloat(v.ToDecimalString(), 24, 8);
 }
예제 #8
0
 public LiteralExpr ConstantReal(Microsoft.Basetypes.BigDec value)
 {
     return(new LiteralExpr(Token.NoToken, value, Immutable));
 }