Skip to content

Commit

Permalink
fix issue create_new_range_constraint has an off-by-one error if nu…
Browse files Browse the repository at this point in the history
…mber of bits being constrained is small (affects Noir) #6929
  • Loading branch information
zac-williamson committed Jun 6, 2024
1 parent 26a1fc4 commit 194a34c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBase<typename Arithmetization_
.q_o = 0,
.q_c = 0,
});
create_new_range_constraint(variable_index, 1ULL << num_bits, msg);
create_new_range_constraint(variable_index, (1ULL << num_bits) - 1, msg);
} else {
decompose_into_default_range(variable_index, num_bits, DEFAULT_PLOOKUP_RANGE_BITNUM, msg);
}
Expand Down

0 comments on commit 194a34c

Please sign in to comment.