-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add tests for both the C and Java front-end. 2. Make sure we support both variants of the modulus operator on floating-point values in the back-ends: the SMT back-end only supported remainder (and only for FPA mode), the propositional back-end did not distinguish between fmod and IEEE remainder.
- Loading branch information
1 parent
55a26d4
commit a7d2d63
Showing
30 changed files
with
181 additions
and
175 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class farith2 | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
// examples from | ||
// https://stackoverflow.com/questions/2947044/how-do-i-use-modulus-for-float-double | ||
// and | ||
// https://stackoverflow.com/questions/25734144/difference-between-c-functions-remainder-and-fmod | ||
double d1 = 0.5 % 0.3; | ||
assert d1 == 0.2; | ||
double d2 = (-0.5) % 0.3; | ||
assert d2 == -0.2; | ||
double x = 7.5, y = 2.1; | ||
double xModY = x % y; | ||
assert xModY > 1.19 && xModY < 1.21; | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
.../__sort_of_CPROVER_remainder-01/test.desc → jbmc/regression/jbmc/farith2/test.desc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
KNOWNBUG | ||
main.c | ||
--pointer-check --bounds-check | ||
CORE | ||
farith2 | ||
|
||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
|
9 changes: 0 additions & 9 deletions
9
regression/cbmc-library/__sort_of_CPROVER_remainder-01/main.c
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
regression/cbmc-library/__sort_of_CPROVER_remainderf-01/main.c
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
regression/cbmc-library/__sort_of_CPROVER_remainderf-01/test.desc
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
regression/cbmc-library/__sort_of_CPROVER_remainderl-01/main.c
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
regression/cbmc-library/__sort_of_CPROVER_remainderl-01/test.desc
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.