source: CIVL/examples/arithmetic/algebra.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: 435 bytes
Line 
1/* Commandline execution:
2 * civl verify algebra.cvl
3 */
4$input int x;
5$input int y;
6
7void main() {
8 int z0 = x*x + 2*x*y + y*y;
9 int z1 = (x + y) * (x + y);
10 int z2 = x*x - y*y;
11 int z3 = (x + y) * (x - y);
12 int z4 = x*x*x - y*y*y;
13 int z5 = (x - y) * (x*x + x*y + y*y);
14 int z6 = x*x*x + y*y*y;
15 int z7 = (x + y) * (x*x - x*y + y*y);
16
17 $assert(z0 == z1);
18 $assert(z2 == z3);
19 $assert(z4 == z5);
20 $assert(z6 == z7);
21}
Note: See TracBrowser for help on using the repository browser.