1.23
2.0
main
test-branch
|
Last change
on this file since d48b845 was d42b98b, checked in by Ziqing Luo <ziqing@…>, 11 years ago |
|
update math.cvl with MATH macros
changed examples name for no conflict with library implementations
changed corresponding test classes
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1802 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
214 bytes
|
| Line | |
|---|
| 1 | #include <math.h>
|
|---|
| 2 | #include <stdio.h>
|
|---|
| 3 |
|
|---|
| 4 | $input double x;
|
|---|
| 5 | $assume x >= 0.0;
|
|---|
| 6 |
|
|---|
| 7 | int main(int argc, char * argv[]) {
|
|---|
| 8 | double y = sqrt(x) + 1;
|
|---|
| 9 |
|
|---|
| 10 | if(x == 0.0)
|
|---|
| 11 | $assert(y == 1);
|
|---|
| 12 | else
|
|---|
| 13 | $assert(y > 1);
|
|---|
| 14 | return 0;
|
|---|
| 15 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.