Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0ab79ad9 authored by ZIMMERMANN Paul's avatar ZIMMERMANN Paul
Browse files

fixed check.sage for Sage 9

parent d766a149
No related branches found
Tags git-7.0.5
Loading
Pipeline #502667 passed
...@@ -47,7 +47,7 @@ def FindGroupOrderParam (p, sigma, param): ...@@ -47,7 +47,7 @@ def FindGroupOrderParam (p, sigma, param):
elif param == 3: elif param == 3:
return FindGroupOrderParam3 (p, sigma) return FindGroupOrderParam3 (p, sigma)
else: else:
print "Invalid parametrization: ", param print ("Invalid parametrization: ", param)
raise ValueError raise ValueError
# check if the prime p is found with B1,B2,param,sigma, or raises an error # check if the prime p is found with B1,B2,param,sigma, or raises an error
...@@ -66,8 +66,8 @@ def check_found_aux (ecm, p, B1, B2, param, sigma): ...@@ -66,8 +66,8 @@ def check_found_aux (ecm, p, B1, B2, param, sigma):
l = f.readlines() l = f.readlines()
f.close() f.close()
n = len(l) n = len(l)
if l[n-1] <> 'Found input number N\n': if l[n-1] != 'Found input number N\n':
print "prime p=", p, "not found with B1=", B1, "B2=", B2, "param=", param, "sigma=", sigma print ("prime p=", p, "not found with B1=", B1, "B2=", B2, "param=", param, "sigma=", sigma)
raise ValueError raise ValueError
def is_found(l, B1, B2): def is_found(l, B1, B2):
...@@ -105,7 +105,7 @@ def check_found (ecm, p, B1, B2, param, sigma_max): ...@@ -105,7 +105,7 @@ def check_found (ecm, p, B1, B2, param, sigma_max):
# check the factor is really found # check the factor is really found
check_found_aux (ecm, p, B1, B2, param, sigma) check_found_aux (ecm, p, B1, B2, param, sigma)
found += 1 found += 1
print tries, found, 1.0*e2/tries, 1.0*e3/tries, 2.0^(e2/tries)*3.0^(e3/tries) print (tries, found, 1.0*e2/tries, 1.0*e3/tries, 2.0^(e2/tries)*3.0^(e3/tries))
# check all parametrizations 0, 1, 2, 3 # check all parametrizations 0, 1, 2, 3
# check_found_all ("./ecm", 31622776601683800097, 11000, 1873422, 1000) # check_found_all ("./ecm", 31622776601683800097, 11000, 1873422, 1000)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment