source: CIVL/examples/arithmetic/algebra.cvl@ 7d77e64

main test-branch
Last change on this file since 7d77e64 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: 456 bytes
Line 
1/* Commandline execution:
2 * civl verify algebra.cvl
3 */
4#include <civlc.cvh>
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.