div operators

This commit is contained in:
Jordi Baylina
2019-12-07 21:47:00 +01:00
parent 2a45647274
commit eaf4396cb3
9 changed files with 224 additions and 63 deletions

24
test/circuits/inc.circom Normal file
View File

@@ -0,0 +1,24 @@
template Main() {
signal input in;
signal output out[2];
// First play with variables;
var c = 3;
var d = c++; // d --> 3
var e = ++c; // e --> 5
out[0] <== in + e; // in + 5
// Then play with signals
c = in;
d = c++; //d <-- in;
e = ++c; // d <-- in+2
out[1] <== in + e; // 2*in +2
}
component main = Main();