File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ function(add_example example_target)
5757endfunction ()
5858
5959add_example(arithmetics_example SOURCES arithmetics.cpp INPUT arithmetics.inp)
60+ add_example(integral_arithmetics_example SOURCES integral_arithmetics.cpp INPUT integral_arithmetics.inp)
6061add_example(poseidon_example SOURCES poseidon.cpp INPUT poseidon.inp)
6162add_example(merkle_tree_poseidon_example SOURCES merkle_tree_poseidon.cpp INPUT merkle_tree_poseidon.inp)
6263add_example(merkle_tree_sha2_256_example SOURCES merkle_tree_sha2_256.cpp INPUT merkle_tree_sha2_256.inp)
Original file line number Diff line number Diff line change 1+ int pow (int a, int n) {
2+ if (n == 0 )
3+ return 1 ;
4+
5+ int res = 1 ;
6+ for (int i = 0 ; i < n; ++i) {
7+ res *= a;
8+ }
9+ return res;
10+ }
11+
12+ [[circuit]] int int_arithmetic_example (int a, int b) {
13+ int c = (a + b) * a + b * (a + b) * (a + b);
14+ const int constant = 77 ;
15+ return c * c * c * (b - a) + pow (a, 2 ) + constant;
16+ }
Original file line number Diff line number Diff line change 1+ [
2+ {"int": 5},
3+ {"int": 11}
4+ ]
You can’t perform that action at this time.
0 commit comments