Skip to content

Commit

Permalink
chore: enable NOT for signed integers (#1789)
Browse files Browse the repository at this point in the history
NOT for signed integers
  • Loading branch information
guipublic authored Jun 22, 2023
1 parent 1f9a132 commit 401888c
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,6 @@ impl AcirContext {

/// Adds a new variable that is constrained to be the logical NOT of `x`.
pub(crate) fn not_var(&mut self, x: AcirVar, typ: AcirType) -> Result<AcirVar, AcirGenError> {
if typ.is_signed() {
todo!("implement NOT for signed integers");
}
let bit_size = typ.bit_size();
// Subtracting from max flips the bits
let max = self.add_constant(FieldElement::from((1_u128 << bit_size) - 1));
Expand Down

0 comments on commit 401888c

Please sign in to comment.