-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Update primetest.py fixing Miller-Rabin for even numbers #27146
base: master
Are you sure you want to change the base?
Conversation
✅ Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like: This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.14. Click here to see the pull request description that was parsed.
|
@@ -76,6 +76,7 @@ def test_is_extra_strong_lucas_prp(): | |||
|
|||
@slow | |||
def test_prps(): | |||
assert [mr(i) for i in (1, 2, 4)] == [False, True, False] |
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 test fails because it does not pass the second argument to mr
.
You'll need to add yourself to the .mailmap file: A line like this needs to be added:
Then run |
I'm marking this as draft. Feel free to mark it as ready for review after the review comments above are addressed. |
Update primetest.py fixing Miller-Rabin for even numbers
References to other Issues or PRs
Fixes #27145
Brief description of what is fixed or changed
inside of primetest.py I added in addition to the preexisting check to make sure that numbers put through the Miller-Rabin function were less than 2, that they also were not divisible by two in order to remove all even numbers from the equation fixing the false positives created when running the function with even numbers such as 90.
Other comments
Release Notes