From a3b2bfa16f991f4d5f844b6d18e836e57b4195a1 Mon Sep 17 00:00:00 2001 From: Checkmate50 Date: Wed, 14 Oct 2015 13:02:48 -0600 Subject: Floating point constants given as integers are now translated correctly --- Source/Basetypes/BigFloat.cs | 2 ++ float_test5.bpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Basetypes/BigFloat.cs b/Source/Basetypes/BigFloat.cs index 9e798959..bbc39db4 100644 --- a/Source/Basetypes/BigFloat.cs +++ b/Source/Basetypes/BigFloat.cs @@ -146,6 +146,8 @@ namespace Microsoft.Basetypes this.mantissa = 0; this.isDec = true; this.dec_value = dec_value; + if (this.dec_value.IndexOf(".") == -1) + this.dec_value += ".0"; //Assures that the decimal value is a "real" number } private BIM maxMantissa() diff --git a/float_test5.bpl b/float_test5.bpl index 2661a736..be72b988 100644 --- a/float_test5.bpl +++ b/float_test5.bpl @@ -1,4 +1,4 @@ procedure F() returns () { var x : float; - assert x - x == fp(0.0); + assert x - x == fp(0); } \ No newline at end of file -- cgit v1.2.3