-
Notifications
You must be signed in to change notification settings - Fork 433
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 #481 from iden3/pi_check
PI check and additional tests
- Loading branch information
Showing
10 changed files
with
1,068 additions
and
9 deletions.
There are no files selected for viewing
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,16 @@ | ||
template Multiplier(n) { | ||
signal input a; | ||
signal input b; | ||
signal output c; | ||
|
||
signal int[n]; | ||
|
||
int[0] <== a*a + b; | ||
for (var i=1; i<n; i++) { | ||
int[i] <== int[i-1]*int[i-1] + b; | ||
} | ||
|
||
c <== int[n-1]; | ||
} | ||
|
||
component main {public [a]} = Multiplier(1000); |
Binary file not shown.
Oops, something went wrong.