source: CIVL/examples/arithmetic/algebra.cvl@ 1258be5

1.23 2.0 main test-branch
Last change on this file since 1258be5 was ac5660f, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

Cleaning up examples.. (in progress).

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

  • Property mode set to 100644
File size: 450 bytes
Line 
1/* Commandline execution:
2 * civl verify algebra.cvl
3 */
4#include <civlc.h>
5$input int x;
6$input int y;
7
8void main() {
9 int z0 = x*x + 2*x*y + y*y;
10 int z1 = (x + y) * (x + y);
11 int z2 = x*x - y*y;
12 int z3 = (x + y) * (x - y);
13 int z4 = x*x*x - y*y*y;
14 int z5 = (x - y) * (x*x + x*y + y*y);
15 int z6 = x*x*x + y*y*y;
16 int z7 = (x + y) * (x*x - x*y + y*y);
17
18 $assert z0 == z1;
19 $assert z2 == z3;
20 $assert z4 == z5;
21 $assert z6 == z7;
22}
Note: See TracBrowser for help on using the repository browser.