diff options
author | Checkmate50 <dgeisler50@gmail.com> | 2016-05-31 12:59:38 -0600 |
---|---|---|
committer | Checkmate50 <dgeisler50@gmail.com> | 2016-05-31 12:59:38 -0600 |
commit | c19c2495497d0dfa7aaf871cf833cd5e5f986d33 (patch) | |
tree | 86c6f9fdd2baf6d8f8b2ebacda439d1ee6853dcc /Test/floats/test6.bpl | |
parent | 6f7fc01346c0ebe9072e61ace2cfede4fcedea09 (diff) |
moved all the tests to the testing folder
Diffstat (limited to 'Test/floats/test6.bpl')
-rw-r--r-- | Test/floats/test6.bpl | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Test/floats/test6.bpl b/Test/floats/test6.bpl new file mode 100644 index 00000000..6bef1137 --- /dev/null +++ b/Test/floats/test6.bpl @@ -0,0 +1,40 @@ +//Translation from filter2.c +//Should give an error +//FAILS; doesn't generate terms! + +procedure main() returns () { + var E : float(11 53); + var E0 : float(11 53); + var E1 : float(11 53); + var S : float(11 53); + var S0 : float(11 53); + var S1 : float(11 53); + var i: int; + + havoc E; + havoc E0; + assume(E >= fp(0.0 11 53) && E <= fp(1.0 11 53)); + assume(E0 >= fp(0.0 11 53) && E0 <= fp(1.0 11 53)); + + E1 := fp(0.0 11 53); + S1 := fp(0.0 11 53); + S0 := fp(0.0 11 53); + S := fp(0.0 11 53); + + i := 0; +// while (i <= 1000000) +// { + E1 := E0; + E0 := E; + + havoc E; + assume(E >= fp(0.0 11 53) && E <= fp(1.0 11 53)); + + S1 := S0; + S0 := S; + S := E*fp(0.7 11 53) - E0*fp(1.3 11 53) + E1*fp(1.1 11 53) + S0*fp(1.4 11 53) - S1*fp(0.7 11 53); + + assert(S >= fp(-4.0 11 53) && S <= fp(4.0 11 53)); + //i := i + 1; +// } +}
\ No newline at end of file |