Skip to content

Python implementation of the Baillie-PSW primality test

Notifications You must be signed in to change notification settings

armchaircaver/Baillie-PSW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Baillie-PSW

Python implementation of the Baillie-PSW primality test, based on the following papers:

Files in the repository are:

  • baillie_psw.py contains the implemetation of the algorithm

  • baillie PSW test suite.py has a suite of tests of the algorithm, using sieve and segmented sieve to generate test numbers

  • Compare pseudoprimes.py is a test suite to compare the performance and correctness of the standard and strengthened Lucas algorithms, using known pseudoprimes obtained from Pseudoprime Statistics, Tables, and Data (Fermat, Miller-Rabin, Lucas, Fibonacci, Pell, Frobenius, Baillie-PSW), Dana Jacobsen, 31 March 2020, http://ntheory.org/pseudoprimes.html

My implementation of the strengthened algorithm is slightly slower than the standard algorithm, so the standard algorithm is used in baillie_psw

About

Python implementation of the Baillie-PSW primality test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages