Commit 979fce77 authored by Christoph Conrads's avatar Christoph Conrads

Limit maximum integer factorization digit count

parent 087ecc8c
......@@ -152,7 +152,7 @@ def factorize(kind, w, r, s, m):
qs = f(n)
factors = collections.Counter(qs) + ps
elif kind == 'swc':
elif kind == 'swc' and w*(r-s)/2 < 200:
b = 2**w
np1 = (2**(w*(r-s)/2) + 1)
nm1 = (2**(w*(r-s)/2) - 1)
......@@ -171,7 +171,7 @@ def factorize(kind, w, r, s, m):
assert 2 not in factors
factors[2] = s*w
elif w < 24:
elif w*r < 300:
factors = f(m)
else:
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment