Skip to content

Commit b1dc96e

Browse files
committed
fix bug
1 parent cc7c462 commit b1dc96e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cyaron/math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def miller_rabin(n, repeat_time=20):
160160
d >>= 1
161161
s += 1
162162
for _ in range(repeat_time):
163-
a = random.randint(2, n)
163+
a = random.randint(2, n - 1)
164164
if not miller_rabin_pass(a, s, d, n):
165165
return False
166166
return True

0 commit comments

Comments
 (0)