diff options
-rw-r--r-- | Source/Basetypes/BigFloat.cs | 2 | ||||
-rw-r--r-- | float_test5.bpl | 2 |
2 files changed, 3 insertions, 1 deletions
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 |