\\ --------------- GP code --------------------------------------- \\ \\ Time-stamp: \\ \\----------------------------------------------------------------- \\ etaf calculates Dedekind's eta function on forms [a,b,c] i.e: \\ eta(tau), where tau = (b+sqrt(-d))/(2a) and d= b^2-4ac. ett does \\ the calculation in the fundamental domain and etaf first does a \\ reduction keeping track of the multiplier. \\ Used to compute explicit elliptic units in ring class fields but \\ can be used on its own. \\====================================================================== etaf(q)= {local(d,sqx,a,b,c,aux,mult,n24,n,aa,z); d=4*q[1]*q[3]-q[2]^2; mult=1; n24=0; a=q[1];b=q[2]; if(c==0,c=(b*b+d)/(4*a),c=q[3]); if(sqx==0,sqx=sqrt(-b^2+4*a*c),); aa=2*a; n=(a+b)\aa; if(n, aux=a*n; c=c+(aux-b)*n; b=b-2*aux; n24=n24+n; ,); while(c