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
template Num2Bits5(n) { | |
signal input in; | |
signal output out[n]; | |
signal a[n]; | |
signal b[n]; | |
signal c[n]; | |
var lc = 0; | |
var r = in; | |
for (var i=0; i<n; i++) { |
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 IS BAD | |
template BadExample() { | |
signal input a; | |
signal input b; | |
signal output c; | |
if (a==1) { | |
c <== b*b; | |
} else { | |
c <== b+5; |
OlderNewer