bridge/class-master/depend/pari/src/basemath/ecpp.c
/* primelist containing primes whose absolute value is at most maxsqrt */
primelist containing primes whose absolute value is at most maxsqrt
primelist containing primes whose absolute value is at most maxsqrt
static GEN
ecpp_primelist_init(long maxsqrt)
{
  GEN P = cgetg(maxsqrt, t_VECSMALL);
  forprime_t T;
  long p, j = 4;
  u_forprime_init(&T, 3, maxsqrt);
  P[1] =  8; P[2] = -4; P[3] = -8;
  while((p = u_forprime_next(&T))) P[j++] = ((p & 3UL) == 1)? p: -p;
  setlg(P,j); return P;
}
static GEN ecpp_primelist_init ( long maxsqrt ) { GEN P = cgetg ( maxsqrt , t_VECSMALL ) ; forprime_t T ; long p , j = 4 ; u_forprime_init ( & T , 3 , maxsqrt ) ; P [ 1 ] = 8 ; P [ 2 ] = -4 ; P [ 3 ] = -8 ; while ( ( p = u_forprime_next ( & T ) ) ) P [ j ++ ] = ( ( p & 3UL ) == 1 ) ? p : - p ; setlg ( P , j ) ; return P ; }
primelist containing primes whose absolute value is at most maxsqrt
primelist containing primes whose absolute value is at most maxsqrt