bridge/class-master/depend/pari/src/basemath/buch1.c
/* Check for a "large prime relation" involving q; q may not be prime */
Check for a "large prime relation" involving q; q may not be prime
Check for a " large prime relation " involving q ; q may not be prime
static long *
largeprime(struct buch_quad *B, long q, GEN ex, long np, long nrho)
{
  const long hashv = hash(q);
  long *pt, i, l = lg(B->subFB);
  for (pt = B->hashtab[hashv]; ; pt = (long*) pt[0])
  {
    if (!pt)
    {
      pt = (long*) pari_malloc((l+3) * sizeof(long));
      *pt++ = nrho; 
      *pt++ = np;   
      *pt++ = q;    
      pt[0] = (long)B->hashtab[hashv];
      for (i=1; i<l; i++) pt[i]=ex[i];
      B->hashtab[hashv]=pt; return NULL;
    }
    if (pt[-1] == q) break;
  }
  for(i=1; i<l; i++)
    if (pt[i] != ex[i]) return pt;
  return (pt[-2]==np)? NULL: pt;
}
static long * largeprime ( struct buch_quad * B , long q , GEN ex , long np , long nrho ) { const long hashv = hash ( q ) ; long * pt , i , l = lg ( B -> subFB ) ; for ( pt = B -> hashtab [ hashv ] ; ; pt = ( long * ) pt [ 0 ] ) { if ( ! pt ) { pt = ( long * ) pari_malloc ( ( l + 3 ) * sizeof ( long ) ) ; * pt ++ = nrho ; * pt ++ = np ; * pt ++ = q ; pt [ 0 ] = ( long ) B -> hashtab [ hashv ] ; for ( i = 1 ; i < l ; i ++ ) pt [ i ] = ex [ i ] ; B -> hashtab [ hashv ] = pt ; return NULL ; } if ( pt [ -1 ] == q ) break ; } for ( i = 1 ; i < l ; i ++ ) if ( pt [ i ] != ex [ i ] ) return pt ; return ( pt [ -2 ] == np ) ? NULL : pt ; }
Check for a "large prime relation" involving q; q may not be prime
Check for a " large prime relation " involving q ; q may not be prime
/* nrho = pt[-3] */ /* np   = pt[-2] */ /* q    = pt[-1] */