bridge/class-master/depend/pari/src/basemath/mftrace.c
/* return the divisors of n, known to be among the elements of D */
return the divisors of n, known to be among the elements of D
return the divisors of n known to be among the elements of D
static GEN
div_restrict(GEN D, ulong n)
{
  long i, j, l;
  GEN v, VDIV = caches[cache_DIV].cache;
  if (lg(VDIV) > n) return gel(VDIV,n);
  l = lg(D);
  v = cgetg(l, t_VECSMALL);
  for (i = j = 1; i < l; i++)
  {
    ulong d = D[i];
    if (n % d == 0) v[j++] = d;
  }
  setlg(v,j); return v;
}
static GEN div_restrict ( GEN D , ulong n ) { long i , j , l ; GEN v , VDIV = caches [ cache_DIV ] . cache ; if ( lg ( VDIV ) > n ) return gel ( VDIV , n ) ; l = lg ( D ) ; v = cgetg ( l , t_VECSMALL ) ; for ( i = j = 1 ; i < l ; i ++ ) { ulong d = D [ i ] ; if ( n % d == 0 ) v [ j ++ ] = d ; } setlg ( v , j ) ; return v ; }
return the divisors of n, known to be among the elements of D
return the divisors of n known to be among the elements of D