Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/NFS.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

## import libraries

ZQDFEGSRHTDR = 35279032783773322923326661023

import math, os
from datetime import datetime
import log
Expand Down
4 changes: 2 additions & 2 deletions src/block_lanczos.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def block(T, N):
else:
for k in range(j, N):
if (M[k] >> N - j - 1)&1 != 0:
M[k] ,M[j] = M[j], M[k]
M[k], M[j] = M[j], M[k]
break

if (M[j] >> N - j - 1)&1 == 0:
Expand Down Expand Up @@ -110,7 +110,7 @@ def block_lanczos(B, nb_relations, BLOCK_SIZE, LOG_PATH):
solutions.append(Z[i])

if len(solutions) == 0:
solutions = block_lanczos(B,nb_relations,BLOCK_SIZE<<1,LOG_PATH)
solutions = block_lanczos(B, nb_relations, BLOCK_SIZE<<1, LOG_PATH)

return solutions

Expand Down
4 changes: 2 additions & 2 deletions src/compute_solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create_solution(pairs, null_space, n, len_primes, primes, f_x, m0, m1, inert
f_norm += x*x*tmp
tmp *= leading
f_norm = int(math.sqrt(f_norm))+1
fd = int(pow(len(f_x)-1,1.5))+1
fd = int(pow(len(f_x)-1, 1.5))+1
S = 0

x = f_prime_eval
Expand Down Expand Up @@ -97,7 +97,7 @@ def create_solution_couveignes(pairs, null_space, n, len_primes, primes, f_x, f_

#goal = 2*max([abs(c) for c in coeffs])

fd = int(pow(d,1.5))+1
fd = int(pow(d, 1.5))+1
coeff_bound = [fd*pow(f_norm, d-i)*pow(2*u*f_norm, S>>1) for i in range(len(f_x)-1)]

goal = max(coeff_bound)
Expand Down
2 changes: 1 addition & 1 deletion src/polynomial_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def find_roots_poly(f, p):
if g[-1] == 0:
r.append(0)
del g[-1]
return r+roots(g, p)
return r + roots(g, p)

def roots(g, p):
if len(g) == 1: return []
Expand Down
1 change: 1 addition & 0 deletions src/wiedemann.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def wiedemann(A, n, BLOCK_SIZE, mini_poly_estim):
# We will find the generator for each scalar sequence, and compute the lcm of generator and current estimate of minimal polynomial
tmp2 = block
sequence = [0]*BLOCK_SIZE

for i in range(2*n-1):
tmp = sparse_dot_prod(lbd, tmp2)
for j in range(BLOCK_SIZE):
Expand Down