bridge/class-master/depend/pari/src/basemath/lfunutils.c
/* return 1 if cuspidal, 0 if holomorphic, -1 otherwise */
return 1 if cuspidal, 0 if holomorphic, -1 otherwise
return 1 if cuspidal 0 if holomorphic - 1 otherwise
static int
etacuspidal(GEN N, GEN k, GEN B, GEN R, GEN NB)
{
  long i, j, lD, l, cusp = 1;
  GEN D;
  if (gsigne(k) < 0) return -1;
  D = divisors(N); lD = lg(D); l = lg(B);
  for (i = 1; i < lD; i++)
  {
    GEN t = gen_0, d = gel(D,i);
    long s;
    for (j = 1; j < l; j++)
      t = addii(t, mulii(gel(NB,j), mulii(gel(R,j), sqri(gcdii(d, gel(B,j))))));
    s = signe(t);
    if (s < 0) return -1;
    if (!s) cusp = 0;
  }
  return cusp;
}
static int etacuspidal ( GEN N , GEN k , GEN B , GEN R , GEN NB ) { long i , j , lD , l , cusp = 1 ; GEN D ; if ( gsigne ( k ) < 0 ) return -1 ; D = divisors ( N ) ; lD = lg ( D ) ; l = lg ( B ) ; for ( i = 1 ; i < lD ; i ++ ) { GEN t = gen_0 , d = gel ( D , i ) ; long s ; for ( j = 1 ; j < l ; j ++ ) t = addii ( t , mulii ( gel ( NB , j ) , mulii ( gel ( R , j ) , sqri ( gcdii ( d , gel ( B , j ) ) ) ) ) ) ; s = signe ( t ) ; if ( s < 0 ) return -1 ; if ( ! s ) cusp = 0 ; } return cusp ; }
return 1 if cuspidal, 0 if holomorphic, -1 otherwise
return 1 if cuspidal 0 if holomorphic - 1 otherwise