We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cs.IsZero
cs.IsZero(a) returns 1 if a == 0 and 0 otherwise.
cs.IsZero(a)
a == 0
Replace current circuit code by these 3 constraints (instead of binary decomposition):
m * (1 - m) = 0 // constrain m to be 0 or 1 m * a = 0 // constrain m to be 0 if a != 0 _ = inverse(m + a) // constrain m to be 1 if a == 0
m is computed by the solver such that m = 1 - a^(modulus - 1)
m
m = 1 - a^(modulus - 1)
The text was updated successfully, but these errors were encountered:
feat: IsZero is now implemented with 3 constraints fixes #132
ed3c006
gbotrel
No branches or pull requests
cs.IsZero(a)
returns 1 ifa == 0
and 0 otherwise.Replace current circuit code by these 3 constraints (instead of binary decomposition):
m
is computed by the solver such thatm = 1 - a^(modulus - 1)
The text was updated successfully, but these errors were encountered: