|
@@ -1,11 +1,11 @@
|
1
|
1
|
from psimp import in_100, hund_div
|
2
|
2
|
from lucas import LucasPrime, StrongLucasPrime
|
3
|
3
|
from millerrabin import MillerRabin
|
4
|
|
-from sieve import sieval
|
5
|
|
-from time import process_time
|
6
|
4
|
|
7
|
5
|
|
8
|
6
|
def BailliePSW(n):
|
|
7
|
+ """Run Baillie-PSW probable prime test
|
|
8
|
+ """
|
9
|
9
|
if n < 2:
|
10
|
10
|
return False
|
11
|
11
|
if in_100(n):
|
|
@@ -18,6 +18,9 @@ def BailliePSW(n):
|
18
|
18
|
|
19
|
19
|
|
20
|
20
|
def BailliePSWWeak(n):
|
|
21
|
+ """Run a weaker version of the Baillie-PSW probable prime test, using the
|
|
22
|
+ weaker lucas test.
|
|
23
|
+ """
|
21
|
24
|
if n < 2:
|
22
|
25
|
return False
|
23
|
26
|
if in_100(n):
|