bridge/class-master/depend/pari/src/basemath/lfunutils.c
/* return Nebentypus of eta quotient, k2 = 2*k integral */
return Nebentypus of eta quotient, k2 = 2*k integral
return Nebentypus of eta quotient k2 = 2 * k integral
static GEN
etachar(GEN B, GEN R, GEN k2)
{
  long i, l = lg(B);
  GEN P = gen_1;
  for (i = 1; i < l; ++i) if (mpodd(gel(R,i))) P = mulii(P, gel(B,i));
  switch(Mod4(k2))
  {
    case 0: break;
    case 2:  P = negi(P); break;
    default: P = shifti(P, 1); break;
  }
  return coredisc(P);
}
static GEN etachar ( GEN B , GEN R , GEN k2 ) { long i , l = lg ( B ) ; GEN P = gen_1 ; for ( i = 1 ; i < l ; ++ i ) if ( mpodd ( gel ( R , i ) ) ) P = mulii ( P , gel ( B , i ) ) ; switch ( Mod4 ( k2 ) ) { case 0 : break ; case 2 : P = negi ( P ) ; break ; default : P = shifti ( P , 1 ) ; break ; } return coredisc ( P ) ; }
return Nebentypus of eta quotient, k2 = 2*k integral
return Nebentypus of eta quotient k2 = 2 * k integral