Godtone (talk | contribs)
m My Python 3 code: allow using factorization to avoid re-factorizations
Godtone (talk | contribs)
m My Python 3 code: fix sopfr
Line 1,253: Line 1,253:
f[0] = num2s # restore
f[0] = num2s # restore
if func==3:
if func==3:
return sum([ prime_idx(i)*f[i] for i in range(len(f)) ])
return sum([ prime_idx(i)*abs(f[i]) for i in range(len(f)) ])
return no2s_x[0]*no2s_x[1] if func==2 else math.log(no2s_x[0]*no2s_x[1], 2) if func==1 else func(x, f, no2s_x[0], no2s_x[1])
return no2s_x[0]*no2s_x[1] if func==2 else math.log(no2s_x[0]*no2s_x[1], 2) if func==1 else func(x, f, no2s_x[0], no2s_x[1])