Skip to content

Commit

Permalink
fix: negate the subtrahend when processing Expression::Sum in `Eval…
Browse files Browse the repository at this point in the history
…uator::add_expression`
  • Loading branch information
han0110 committed Jun 21, 2022
1 parent bb8070e commit 3966f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion halo2_proofs/src/plonk/evaluation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ impl<C: CurveAffine> Evaluator<C> {
let result_a = self.add_expression(a);
let result_b = self.add_expression(b_int);
if result_a == ValueSource::Constant(0) {
result_b
self.add_calculation(Calculation::Negate(result_b))
} else if result_b == ValueSource::Constant(0) {
result_a
} else {
Expand Down

0 comments on commit 3966f4e

Please sign in to comment.