source: CIVL/examples/arithmetic/ex3_simple.cvl

main
Last change on this file was b689afd, checked in by Stephen Siegel <siegel@…>, 4 weeks ago

Getting rid of unused examples that are not good and starting to clean
up others.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@6036 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 346 bytes
Line 
1#include <math.h>
2#include <stdio.h>
3
4#define L 5
5$input double a, b;
6$assume(a > 0);
7$assume(a == b);
8
9void main() {
10 double y = a;
11 int i;
12
13 for(i=0; i<L; i++) {
14 y = sqrt(y);
15 printf("the %d time y = %f\n", i, y);
16 }
17 for(int i=0; i<L; i++) {
18 y = y * y;
19 printf("the %d time y = %f\n", i, y);
20 }
21
22 $assert(y == b);
23}
Note: See TracBrowser for help on using the repository browser.