Skip to content

Conversation

@2400060033
Copy link

This PR adds a short reference section linking to Steven Berg’s work on hashed deterministic Miller–Rabin base selection, as requested in issue #1561.

The linked resource provides optimized base buckets for 32–64 bit primality testing, extending earlier deterministic base research and offering an option for further reading.

Fixes #1561.

This PR adds a short reference section linking to Steven Berg’s work on hashed
deterministic Miller–Rabin base selection, as requested in issue cp-algorithms#1561.

The linked resource provides optimized base buckets for 32–64 bit primality
testing, extending earlier deterministic base research and offering an option
for further reading.

Fixes cp-algorithms#1561.
@mhayter
Copy link
Contributor

mhayter commented Nov 29, 2025

This doesn't seem to add much imo.

@adamant-pwn
Copy link
Member

It reduces number of test calls to guarantee that the test works on 64-bit numbers from 7 to 3. It's a 2x improvement in practice, which is pretty neat, but takes up a lot of source code to store bases tables. Might be good to explain it a bit further in the text.

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.

Fast but long, partly tabular version of deterministic Miller-Rabin up to 2^64

3 participants