Skip to content

Commit

Permalink
Update layouts.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-camuto committed Nov 8, 2024
1 parent 6d21309 commit ff0cc0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/circuit/ops/layouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ pub fn sqrt<F: PrimeField + TensorType + PartialOrd + std::hash::Hash>(
let claimed_output = region.assign(&config.custom_gates.output, &claimed_output)?;
region.increment(claimed_output.len());

// assert value is positive
let sign = sign(config, region, &[input.clone()])?;

// assert the sign is positive
enforce_equality(config, region, &[sign, one.clone()])?;

// this is now of scale 2 * scale
let product = pairwise(
config,
Expand Down

0 comments on commit ff0cc0a

Please sign in to comment.