-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from distributed-lab/feature/parenthesis
Add support for parentheses and QUO operation
- Loading branch information
Showing
5 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
pragma circom 2.1.6; | ||
|
||
template Math(a, b, c) { | ||
var input1 = (a + b) / 2; | ||
var input2 = a + b / 2; | ||
|
||
var PRECOMPUTE_NUMBER = 2 ** c; | ||
|
||
signal tmp1 [a][PRECOMPUTE_NUMBER][2][b]; | ||
|
||
var STRIDE = 8; | ||
var parts = a * c \ STRIDE; | ||
|
||
signal tmp2[a] [2] [b]; | ||
signal tmp3[a] [2][2][b]; | ||
signal tmp4[a - 1][2][2][b]; | ||
|
||
signal powers[parts][2 ** STRIDE][2][a]; | ||
|
||
signal output out1[input1]; | ||
signal output out2[input2]; | ||
} | ||
|
||
component main = Math(6, 20, 3); |