bridge/class-master/depend/pari/src/basemath/mftrace.c
/* list of fundamental discriminants unramified outside N, with sign s
 * [s = 0 => no sign condition] */
list of fundamental discriminants unramified outside N, with sign s
[s = 0 => no sign condition]
list of fundamental discriminants unramified outside N with sign s [ s = 0 = > no sign condition ]
static GEN
mfunram(long N, long s)
{
  long cN = radical_u(N >> vals(N)), p = 1, m = 1, l, c, i;
  GEN D = mydivisorsu(cN), res;
  l = lg(D);
  if (s == 1) m = 0; else if (s == -1) p = 0;
  res = cgetg(6*l - 5, t_VECSMALL);
  c = 1;
  if (!odd(N))
  { 
    if (p) res[c++] = 8;
    if (m) { res[c++] =-8; res[c++] =-4; }
  }
  for (i = 2; i < l; i++)
  { 
    long d = D[i], d4 = d & 3L; 
    if (d4 == 1) { if (p) res[c++] = d; }
    else         { if (m) res[c++] =-d; }
    if (!odd(N))
    {
      if (p) { res[c++] = 8*d; if (d4 == 3) res[c++] = 4*d; }
      if (m) { res[c++] =-8*d; if (d4 == 1) res[c++] =-4*d; }
    }
  }
  setlg(res, c); return res;
}
static GEN mfunram ( long N , long s ) { long cN = radical_u ( N >> vals ( N ) ) , p = 1 , m = 1 , l , c , i ; GEN D = mydivisorsu ( cN ) , res ; l = lg ( D ) ; if ( s == 1 ) m = 0 ; else if ( s == -1 ) p = 0 ; res = cgetg ( 6 * l - 5 , t_VECSMALL ) ; c = 1 ; if ( ! odd ( N ) ) { if ( p ) res [ c ++ ] = 8 ; if ( m ) { res [ c ++ ] = -8 ; res [ c ++ ] = -4 ; } } for ( i = 2 ; i < l ; i ++ ) { long d = D [ i ] , d4 = d & 3L ; if ( d4 == 1 ) { if ( p ) res [ c ++ ] = d ; } else { if ( m ) res [ c ++ ] = - d ; } if ( ! odd ( N ) ) { if ( p ) { res [ c ++ ] = 8 * d ; if ( d4 == 3 ) res [ c ++ ] = 4 * d ; } if ( m ) { res [ c ++ ] = -8 * d ; if ( d4 == 1 ) res [ c ++ ] = -4 * d ; } } } setlg ( res , c ) ; return res ; }
list of fundamental discriminants unramified outside N, with sign s
 [s = 0 => no sign condition]
list of fundamental discriminants unramified outside N with sign s [ s = 0 = > no sign condition ]
/* d = 1 */ /* skip d = 1, done above */ /* d odd, squarefree, d4 = 1 or 3 */