Skip to content

Commit

Permalink
chore: fix issue #6929 (off-by-one error in `UltraCircuitBuilder::cre…
Browse files Browse the repository at this point in the history
…ate_range_constraint`) (#6931)

Fix small bug that creates innaccurate range constraints for small
scalar values in UltraCircuitBuilder
  • Loading branch information
zac-williamson authored Jun 6, 2024
1 parent ccc474d commit 16deef6
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 16deef6

Please sign in to comment.