From 0ab79ad9c9e3d507bc2012f7f18f5fb0fa9ab9cd Mon Sep 17 00:00:00 2001 From: Paul Zimmermann <Paul.Zimmermann@inria.fr> Date: Thu, 5 May 2022 13:34:53 +0200 Subject: [PATCH] fixed check.sage for Sage 9 --- check.sage | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check.sage b/check.sage index 1193adf4..28eb3365 100644 --- a/check.sage +++ b/check.sage @@ -47,7 +47,7 @@ def FindGroupOrderParam (p, sigma, param): elif param == 3: return FindGroupOrderParam3 (p, sigma) else: - print "Invalid parametrization: ", param + print ("Invalid parametrization: ", param) raise ValueError # 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): l = f.readlines() f.close() n = len(l) - if l[n-1] <> 'Found input number N\n': - print "prime p=", p, "not found with B1=", B1, "B2=", B2, "param=", param, "sigma=", sigma + if l[n-1] != 'Found input number N\n': + print ("prime p=", p, "not found with B1=", B1, "B2=", B2, "param=", param, "sigma=", sigma) raise ValueError def is_found(l, B1, B2): @@ -105,7 +105,7 @@ def check_found (ecm, p, B1, B2, param, sigma_max): # check the factor is really found check_found_aux (ecm, p, B1, B2, param, sigma) 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_found_all ("./ecm", 31622776601683800097, 11000, 1873422, 1000) -- GitLab