-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
fix: make interface of NCRModuloP
fail-safe
#2469
fix: make interface of NCRModuloP
fail-safe
#2469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks! 🚀
Please do not resolve unless you have instructions to do so or the changes are sufficiently discussed |
@Panquesito7 could you please have a final look? |
@Panquesito7, @realstealthninja could you please have a final look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me ❤️
1635eda
to
a928ddc
Compare
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Panquesito7, @realstealthninja please |
a928ddc
to
fb3fd9c
Compare
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
fb3fd9c
to
d44c270
Compare
Description of Change
The original implementation of
NCRModuloP
, has two problems:fac
is one element too short,math::ncr_modulo_p::NCRModuloP(100, 43).ncr(10, 3, 13)
returns2
, which is incorrect since10C3 = 120
and120%13 = 3
(note different values ofp
).This PR fixes above issues and does some minor refactoring, style improvements and adds missing test cases.
Checklist
Notes:
Updates to fail-safe API of
NCRModuloP