-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
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
Change BigIntNeg opcode into BigIntSub #4243
Labels
enhancement
New feature or request
Comments
guipublic
added a commit
to AztecProtocol/aztec-packages
that referenced
this issue
Feb 5, 2024
Resolves noir issue: noir-lang/noir#4243 The bigint_neg opcode was implemented with a sub, instead of a negate as the name suggest. The name has simply been changed to sub.
AztecBot
pushed a commit
to AztecProtocol/barretenberg
that referenced
this issue
Feb 6, 2024
Resolves noir issue: noir-lang/noir#4243 The bigint_neg opcode was implemented with a sub, instead of a negate as the name suggest. The name has simply been changed to sub.
TomAFrench
pushed a commit
to AztecProtocol/aztec-packages
that referenced
this issue
Feb 7, 2024
Resolves noir issue: noir-lang/noir#4243 The bigint_neg opcode was implemented with a sub, instead of a negate as the name suggest. The name has simply been changed to sub.
michaelelliot
pushed a commit
to Swoir/noir_rs
that referenced
this issue
Feb 28, 2024
Resolves noir issue: noir-lang/noir#4243 The bigint_neg opcode was implemented with a sub, instead of a negate as the name suggest. The name has simply been changed to sub.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
The BigIntNeg opcode is not doing negation, but subtraction
Happy Case
Change the name so that it reflects what it is doing
Alternatives Considered
We could also change it so that it is a negation.
One reason to prefer sub over neg is that the bigint class represent integers modulo a fixed modulus, which is the case for regular unsigned integers in classical programming languages (and also in Noir). So the neg operation is a bit weird for an unsigned type.
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response
The text was updated successfully, but these errors were encountered: