Skip to content

Commit

Permalink
fix"
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Jan 24, 2024
1 parent 9058ca1 commit 8bd254a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plonky2x/core/src/frontend/ops/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<L: PlonkParameters<D>, const D: usize> CircuitBuilder<L, D> {
/// The less than operation (<).
pub fn lt<Lhs, Rhs>(&mut self, lhs: Lhs, rhs: Rhs) -> BoolVariable
where
Lhs: LessThanOrEqual<L, D, Lhs>,
Rhs: LessThanOrEqual<L, D, Lhs>,
{
let lte = rhs.lte(lhs, self);
self.not(lte)
Expand All @@ -180,16 +180,14 @@ impl<L: PlonkParameters<D>, const D: usize> CircuitBuilder<L, D> {
/// The greater than operation (>).
pub fn gt<Lhs, Rhs>(&mut self, lhs: Lhs, rhs: Rhs) -> BoolVariable
where
Lhs: Sub<L, D, Lhs, Output = Rhs> + One<L, D>,
Rhs: LessThanOrEqual<L, D, Rhs>,
Lhs: LessThanOrEqual<L, D, Rhs>,
{
self.lt(rhs, lhs)
}

/// The greater than or equal to operation (>=).
pub fn gte<Lhs, Rhs>(&mut self, lhs: Lhs, rhs: Rhs) -> BoolVariable
where
Lhs: Sub<L, D, Lhs, Output = Rhs> + One<L, D>,
Rhs: LessThanOrEqual<L, D, Lhs>,
{
self.lte(rhs, lhs)
Expand Down Expand Up @@ -219,7 +217,6 @@ impl<L: PlonkParameters<D>, const D: usize> LessThanOrEqual<L, D> for Variable {
generator.output
}
}

mod tests {
#[allow(unused_imports)]
use crate::prelude::{BoolVariable, DefaultBuilder, U32Variable};
Expand Down

0 comments on commit 8bd254a

Please sign in to comment.