-
-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
Concatenate algorithms #8103
Concatenate algorithms #8103
Conversation
@cclauss Review please? |
@@ -1,20 +1,78 @@ | |||
"""Binary Exponentiation.""" | |||
def binary_exponentiation_multiplication(a, b): |
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.
It looks like this function calculates a * b
rather than a ** b
, so shouldn't it belong in a file like binary_multiplication.py
instead?
@@ -17,6 +17,74 @@ def bin_exp_mod(a, n, b): | |||
return (r * r) % b | |||
|
|||
|
|||
def binary_exponentiation_mod_multiplication(a, b, c): |
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.
This function also appears to calculate (modular) multiplication rather than exponentiation, so I feel like this might also belong better in a separate file for binary multiplication
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Where exactly are there merge conflicts? |
Not sure where the merge conflicts are, I'll probably reimplement this pull request fixing the conflicts |
Describe your change:
FIxes #8098
Checklist:
Fixes: #{$ISSUE_NO}
.