【Lecture 3】Circom IsZero #117
Answered
by
readygo67
Demian101
asked this question in
Q&A(提问题在隔壁~)
-
ab <-- a*b
ab === a*b
c <-- ab * ab
c === ab * ab 读 这篇文章 看到一个说法: .... 他说执行期间(execution) template IsZero () {
signal input in;
signal output out;
signal inv;
inv <−− in!=0 ? 1/in : 0; // 赋值, inv 即 inverse, 倒数
out <-- -in*inv +1; // 赋值
out === −in*inv +1; // 电路约束 gate0, gate1, gate2
in*out === 0; // 电路约束 gate3
} 讲道理,在 IsZero template 中,如果 所以 也就是说, |
Beta Was this translation helpful? Give feedback.
Answered by
readygo67
Jul 22, 2023
Replies: 1 comment
-
"==="约束 不仅会在编译器被编译成电路结构,也会在执行期被拿来运行验证。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Demian101
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"==="约束 不仅会在编译器被编译成电路结构,也会在执行期被拿来运行验证。