Implement the improved Lucas test from Baillie et al '21 #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #21
This should probably go in after #62 is fixed.
The plan is to have a "FIPS"
is_prime()
preset (the current one, with the plan to go through the items in #4), and a "BPSW21" preset (this PR). Which one should be the default is not clear.Things to consider:
lucas_test()
where all the previous checks have passed, but the final one (Euler's criterion) failed. Baillie et al don't seem to know either, and include the Euler's criterion just in case, because we already have the values for it.ExtraStrong
andAlmostExtraStrong
(and maybe evenLucasV
) options? They are only used to test against known pseudoprimes, nobody will use them in practice. And they complicate the internals oflucas_test()
.