-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Performance improvements in Number
is_lucas_carmichael(n)
.
If `lucas_factor()` finds some prime factors and some composites factors, we now check the prime factors for p+1 | n+1, so we can return early if the condition is not met, without factoring the composite factors. This is much faster for large `n` that are not Lucas-Carmichael. The trial division is also improved, checking for small factors first and stopping early if `n` has no small factors (<= 5*10^4).
- Loading branch information
Showing
1 changed file
with
73 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters