bridge/class-master/depend/pari/src/basemath/mftrace.c
/* assume N > 0; first cusp is always 0 */
assume N > 0; first cusp is always 0
assume N > 0 ; first cusp is always 0
static GEN
mfcusps_i(long N)
{
  long i, c, l;
  GEN D, v;
  if (N == 1) return mkvec(gen_0);
  D = mydivisorsu(N); l = lg(D); 
  c = mfnumcuspsu_fact(myfactoru(N));
  v = cgetg(c + 1, t_VEC);
  for (i = c = 1; i < l; i++)
  {
    long C = D[i], NC = D[l-i], lima = ugcd(C, NC), A0, A;
    for (A0 = 0; A0 < lima; A0++)
      if (ugcd(A0, lima) == 1)
      {
        A = A0; while (ugcd(A,C) > 1) A += lima;
        gel(v, c++) = sstoQ(A, C);
      }
  }
  return v;
}
static GEN mfcusps_i ( long N ) { long i , c , l ; GEN D , v ; if ( N == 1 ) return mkvec ( gen_0 ) ; D = mydivisorsu ( N ) ; l = lg ( D ) ; c = mfnumcuspsu_fact ( myfactoru ( N ) ) ; v = cgetg ( c + 1 , t_VEC ) ; for ( i = c = 1 ; i < l ; i ++ ) { long C = D [ i ] , NC = D [ l - i ] , lima = ugcd ( C , NC ) , A0 , A ; for ( A0 = 0 ; A0 < lima ; A0 ++ ) if ( ugcd ( A0 , lima ) == 1 ) { A = A0 ; while ( ugcd ( A , C ) > 1 ) A += lima ; gel ( v , c ++ ) = sstoQ ( A , C ) ; } } return v ; }
assume N > 0; first cusp is always 0
assume N > 0 ; first cusp is always 0
/* left on stack */