From 6fad4313b1a4e7f8e6cfcd12b92126a3d9ad58d0 Mon Sep 17 00:00:00 2001 From: Checkmate50 Date: Mon, 4 Jan 2016 19:26:36 -0800 Subject: Added several test cases and some basic documentation for fp usage --- float_test.bpl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'float_test.bpl') diff --git a/float_test.bpl b/float_test.bpl index ebd0ab47..fbf8e4e3 100644 --- a/float_test.bpl +++ b/float_test.bpl @@ -1,5 +1,13 @@ -procedure F(n: float) returns(r: float) - ensures r == n; -{ - r := n; +//Translation from addsub_double_exact.c +//Should Verify +procedure main() returns () { + var x : float(11 53); + var y : float(11 53); + var z : float(11 53); + var r : float(11 53); + x := fp(10000000 11 53); + y := x + fp(1 11 53); + z := x - fp(1 11 53); + r := y - z; + assert r == fp(2 11 53); } \ No newline at end of file -- cgit v1.2.3