Skip to content

Commit

Permalink
Fix comment in math
Browse files Browse the repository at this point in the history
  • Loading branch information
mizar committed Jan 22, 2023
1 parent 5d41c79 commit 1b48ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub fn crt(r: &[i64], m: &[i64]) -> (i64, i64) {
// r2 % m0 = r0
// r2 % mi = ri
// -> (r0 + x*m0) % mi = ri
// -> x*u0*g % (u1*g) = (ri - r0) (u0*g = m0, u1*g = mi)
// -> x*u0*g = ri-r0 (mod u1*g) (u0*g = m0, u1*g = mi)
// -> x = (ri - r0) / g * inv(u0) (mod u1)

// im = inv(u0) (mod u1) (0 <= im < u1)
Expand Down

0 comments on commit 1b48ab9

Please sign in to comment.