Skip to content

Commit

Permalink
Alternative range example
Browse files Browse the repository at this point in the history
  • Loading branch information
moCello committed Jan 2, 2024
1 parent be051cc commit 287b9c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ impl Circuit for TestCircuit {
let d = composer.append_witness(self.d);

// 1) a < 2^6
const HALF_SIX: usize = 3;
composer.component_range::<HALF_SIX>(a);
composer.component_range::<3>(a); // 3 BIT_PAIRS = 6 bits

// 2) b < 2^4
const HALF_FOUR: usize = 2;
composer.component_range::<HALF_FOUR>(b);
composer.component_range::<2>(b); // 2 BIT_PAIRS = 4 bits

// 3) a + b + 42 = c where c is public input
let constraint = Constraint::new()
Expand Down

0 comments on commit 287b9c1

Please sign in to comment.