Skip to content
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

factor: Fix very-rare bug in ρ #1549

Merged
merged 4 commits into from
Jun 19, 2020
Merged

factor: Fix very-rare bug in ρ #1549

merged 4 commits into from
Jun 19, 2020

Conversation

nbraud
Copy link
Contributor

@nbraud nbraud commented Jun 19, 2020

  • Add better error message in factor::numeric::inv_mod_u64
  • Add a testcase that reliably reproduces the problem.
  • Squash the bug >:)

I introduced the problematic codepath in commit 8241037 (#1525)

The test is repeated 20 times to make it overwhelmingly-likely to fail
(the bug itself is only triggered rarely)
This bug can only be triggered when:
- the Miller-Rabin test produces a divisor `d` (rare) ;
- n / d is prime.
@nbraud
Copy link
Contributor Author

nbraud commented Jun 19, 2020

@sylvestre Ping?

@Arcterus Arcterus merged commit f33ffc7 into uutils:master Jun 19, 2020
@nbraud nbraud deleted the factor/strong-pseudoprime-bug branch June 20, 2020 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants