[sage-support] little programe about {CRT(Chinese remainder theorem) vectors} not working. I neeed help please

2008-07-20 Thread doctorantinfo
Hello I wrote this program in SAGE online, but i failed to find error, def gcd_multipliers(x, alpha, i): fac=factor(alpha) projections=[] for p,v in fac: l=[0]*len(x); if gcd(x[i],p)!= 1: l[i]=1; for j in range(1, len(x)) if gcd(x[j],p) == 1: l[j]=1; break projections.append(l) return CRT_vect

[sage-support] Re: CRT_vectors

2008-07-19 Thread doctorantinfo
gt; > > On Sat, Jul 19, 2008 at 10:29 AM, doctorantinfo <[EMAIL PROTECTED]> wrote: > > >> Hello > >> I wrote this program in SAGE online, but i failed to find error, I > >> need help > > >> def gcd_multipliers(x, alpha, i): > >> fac=fac

[sage-support] CRT_vectors

2008-07-19 Thread doctorantinfo
Hello I wrote this program in SAGE online, but i failed to find error, I need help def gcd_multipliers(x, alpha, i): fac=factor(alpha) projections=[] for p,v in fac: l=[0]*len(x); if gcd(x[i],p)!= 1: l[i]=1; for j in range(1, len(x)): if gcd(x[j],p) == 1: l[j]=1; break projections.append(l)