Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect comment in math? #93

Closed
rsk0315 opened this issue Jan 17, 2021 · 1 comment · Fixed by #97
Closed

Incorrect comment in math? #93

rsk0315 opened this issue Jan 17, 2021 · 1 comment · Fixed by #97

Comments

@rsk0315
Copy link
Contributor

rsk0315 commented Jan 17, 2021

// -> x*u0*g % (u1*g) = (r1 - r0) (u0*g = m0, u1*g = m1)

I think this should be:

x*u0*g % (u1*g) = (r1-r0) % (u1*g) (u0*g = m0, u1*g = m1)

For example, when (r0, r1) = (4, 0) and (m0, m1) = (5, 3), we have (x, g, u0, u1) = (-2, 1, 5, 3). So x*u0*g % (u1*g) is -1 (or 2 if we consider non-negative mod), but (r1-r0) is -4.

Anyway, the code itself seems correct.

@yosupo06
Copy link
Collaborator

yosupo06 commented Jan 18, 2021

I intended to x*u0*g \equiv (r1-r0) (\bmod (u1*g) here. So this comment is wrong, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants