import numpy as np, time from formdegree import degree H=np.loadtxt('had163.txt').astype(int); E=np.where(H>0,0,1) reps=[l.split(' rep ')[1].split() for l in open('../macs/poirier-out/formclasses.txt')] log=open('had163deg.log','w') for c in [8,9,0,1,2,3,4,5,6,7]: b=np.exp(2j*np.pi*np.array([int(x) for x in reps[c]])/1e6) for it in range(3000): u=H@b; u=u/abs(u); b=H.T@u; b=b/abs(b) t=time.time(); d,h,err=degree(E,2,b,maxdegs=(8,16,24,32),prec=1600) msg=f"class {c}: degree of the real field of the form = {d if d else '> 32'} (height {h}, newton err {err:.1e}, {time.time()-t:.0f}s)" print(msg,flush=True); log.write(msg+"\n"); log.flush()