bridge/class-master/depend/pari/src/basemath/buch1.c
/* cache data for all primes up to the LIM */
cache data for all primes up to the LIM
cache data for all primes up to the LIM
static void
cache_prime_quad(GRHcheck_t *S, ulong LIM, GEN D)
{
  GRHprime_t *pr;
  long nb;
  if (S->limp >= LIM) return;
  nb = (long)primepi_upper_bound((double)LIM); 
  GRH_ensure(S, nb+1); 
  for (pr = S->primes + S->nprimes;;)
  {
    ulong p = u_forprime_next(&(S->P));
    pr->p = p;
    pr->logp = log((double)p);
    pr->dec = (GEN)kroiu(D,p);
    S->nprimes++;
    pr++;
    if (p >= LIM) { S->limp = p; break; }
  }
}
static void cache_prime_quad ( GRHcheck_t * S , ulong LIM , GEN D ) { GRHprime_t * pr ; long nb ; if ( S -> limp >= LIM ) return ; nb = ( long ) primepi_upper_bound ( ( double ) LIM ) ; GRH_ensure ( S , nb + 1 ) ; for ( pr = S -> primes + S -> nprimes ; ; ) { ulong p = u_forprime_next ( & ( S -> P ) ) ; pr -> p = p ; pr -> logp = log ( ( double ) p ) ; pr -> dec = ( GEN ) kroiu ( D , p ) ; S -> nprimes ++ ; pr ++ ; if ( p >= LIM ) { S -> limp = p ; break ; } } }
cache data for all primes up to the LIM
cache data for all primes up to the LIM
/* #{p <= LIM} <= nb */ /* room for one extra prime */ /* store up to nextprime(LIM) included */