main
test-branch
|
Last change
on this file since bb03188 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
367 bytes
|
| Rev | Line | |
|---|
| [b0119b4] | 1 | #include <civlc.cvh>
|
|---|
| 2 | #include <math.h>
|
|---|
| 3 | #include <stdio.h>
|
|---|
| 4 |
|
|---|
| 5 | #define L 5
|
|---|
| 6 | $input double a, b;
|
|---|
| [e33bcab] | 7 | $assume(a > 0);
|
|---|
| [b0119b4] | 8 | $assume(a == b);
|
|---|
| 9 |
|
|---|
| 10 | void main() {
|
|---|
| 11 | double y = a;
|
|---|
| 12 | int i;
|
|---|
| 13 |
|
|---|
| 14 | for(i=0; i<L; i++) {
|
|---|
| 15 | y = sqrt(y);
|
|---|
| 16 | printf("the %d time y = %f\n", i, y);
|
|---|
| 17 | }
|
|---|
| 18 | for(int i=0; i<L; i++) {
|
|---|
| 19 | y = y * y;
|
|---|
| 20 | printf("the %d time y = %f\n", i, y);
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | $assert(y == b);
|
|---|
| 24 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.