diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-10-29 17:35:13 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-10-29 17:35:13 -0400 |
commit | 1f2d6c15cc587e9e1b91be70186ee9a26d5e1928 (patch) | |
tree | 1b6cd99944efbba2c993327bb49f2d544d50b1eb /Test/floats/float9.bpl | |
parent | 41082463d783d6f8d8a5aaf69bf459b57bca6000 (diff) | |
parent | ba4f9fa1fbd923bfce1363566af08624c5c6fe38 (diff) |
Merge branch 'upstream' into dfsg_freedfsg_free
Diffstat (limited to 'Test/floats/float9.bpl')
-rw-r--r-- | Test/floats/float9.bpl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Test/floats/float9.bpl b/Test/floats/float9.bpl new file mode 100644 index 00000000..b1e46ae4 --- /dev/null +++ b/Test/floats/float9.bpl @@ -0,0 +1,17 @@ +// RUN: %boogie -proverWarnings:1 "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +function {:builtin "(_ to_fp 8 24) RNE"} TO_FLOAT32_INT(int) returns (float24e8); +function {:builtin "(_ to_fp 8 24) RNE"} TO_FLOAT32_REAL(real) returns (float24e8); + +procedure main() returns () { + var x : float24e8; + var y : float24e8; + var z : float24e8; + var r : float24e8; + x := TO_FLOAT32_REAL(1e7); + y := x + TO_FLOAT32_INT(1); + z := x - TO_FLOAT32_INT(1); + r := y - z; + assert r == TO_FLOAT32_INT(2); +}
\ No newline at end of file |