Skip to content

Commit

Permalink
feat: remove unnecessary range constraint in euclidean_division
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Aug 25, 2023
1 parent 41b568d commit 92a28e3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,10 @@ impl GeneratedAcir {
let (q_witness, r_witness) =
self.brillig_quotient(lhs.clone(), rhs.clone(), predicate.clone(), max_bit_size + 1);

// Apply range constraints to injected witness values.
// Constrains `q` to be 0 <= q < 2^{q_max_bits}, etc.
// Constrain `q < 2^{q_max_bits}`.
self.range_constraint(q_witness, max_q_bits)?;
self.range_constraint(r_witness, max_rhs_bits)?;

// Constrain r < rhs
// Constrain `r < rhs`.
self.bound_constraint_with_offset(&r_witness.into(), rhs, predicate, max_rhs_bits)?;

// a * predicate == (b * q + r) * predicate
Expand Down

0 comments on commit 92a28e3

Please sign in to comment.