bridge/class-master/depend/pari/src/basemath/mftrace.c
/**************************************************************************/
/**           Dirichlet characters with precomputed values               **/
/**************************************************************************/
/* CHI mfchar */
Dirichlet characters with precomputed values
CHI mfchar
Dirichlet characters with precomputed values CHI mfchar
static GEN
mfcharcxinit(GEN CHI, long prec)
{
  GEN G = gel(CHI,1), chi = gel(CHI,2), z, V;
  GEN v = ncharvecexpo(G, znconrey_normalized(G,chi));
  long n, l = lg(v), o = mfcharorder(CHI);
  V = cgetg(l, t_VEC);
  z = grootsof1(o, prec); 
  for (n = 1; n < l; n++) gel(V,n) = v[n] < 0? gen_0: gel(z, v[n]+1);
  return mkvecn(6, G, chi, gmfcharorder(CHI), v, V, mfcharpol(CHI));
}
static GEN mfcharcxinit ( GEN CHI , long prec ) { GEN G = gel ( CHI , 1 ) , chi = gel ( CHI , 2 ) , z , V ; GEN v = ncharvecexpo ( G , znconrey_normalized ( G , chi ) ) ; long n , l = lg ( v ) , o = mfcharorder ( CHI ) ; V = cgetg ( l , t_VEC ) ; z = grootsof1 ( o , prec ) ; for ( n = 1 ; n < l ; n ++ ) gel ( V , n ) = v [ n ] < 0 ? gen_0 : gel ( z , v [ n ] + 1 ) ; return mkvecn ( 6 , G , chi , gmfcharorder ( CHI ) , v , V , mfcharpol ( CHI ) ) ; }
Dirichlet characters with precomputed values
CHI mfchar
Dirichlet characters with precomputed values CHI mfchar
/* Mod(t, Phi_o(t)) -> e(1/o) */