Skip to content

Commit

Permalink
Ensure the result is 0 if a == b
Browse files Browse the repository at this point in the history
  • Loading branch information
wwared authored Feb 17, 2024
1 parent 8a6ed04 commit ac8a480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/emulated/src/field_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ where
if a.is_constant() && b.is_constant() {
let a_int = BigInt::from(a);
let b_int = BigInt::from(b);
let res_int = if a_int > b_int {
let res_int = if a_int >= b_int {
(a_int - b_int).rem(P::modulus())
} else {
P::modulus() - (b_int - a_int).rem(P::modulus())
Expand Down

0 comments on commit ac8a480

Please sign in to comment.