bridge/class-master/depend/pari/src/basemath/elliptic.c
/* convert vector of localreds to NF_MINIMALPRIMES */
convert vector of localreds to NF_MINIMALPRIMES
convert vector of localreds to NF_MINIMALPRIMES
static GEN
Q_to_minimalprimes(GEN nf, GEN P, GEN Q)
{
  GEN L, Lr, Ls, Lt, U;
  long k, l = lg(P);
  Lr = vectrunc_init(l);
  Ls = vectrunc_init(l);
  Lt = vectrunc_init(l);
  L = vectrunc_init(l); settyp(L,t_COL);
  U = vectrunc_init(l); settyp(U,t_COL);
  for (k = 1; k < l; k++)
  {
    GEN pr = gel(P, k), q = gel(Q, k), v, u;
    long vu;
    v = gel(q,3);
    u = gel(v,1);
    vu = nfval(nf, u, pr);
    if (!vu) continue;
    vectrunc_append(Lr, gel(v,2));
    vectrunc_append(Ls, gel(v,3));
    vectrunc_append(Lt, gel(v,4));
    vectrunc_append(L, pr);
    vectrunc_append(U, stoi(vu));
  }
  return mkvec5(L, U, Lr, Ls, Lt);
}
static GEN Q_to_minimalprimes ( GEN nf , GEN P , GEN Q ) { GEN L , Lr , Ls , Lt , U ; long k , l = lg ( P ) ; Lr = vectrunc_init ( l ) ; Ls = vectrunc_init ( l ) ; Lt = vectrunc_init ( l ) ; L = vectrunc_init ( l ) ; settyp ( L , t_COL ) ; U = vectrunc_init ( l ) ; settyp ( U , t_COL ) ; for ( k = 1 ; k < l ; k ++ ) { GEN pr = gel ( P , k ) , q = gel ( Q , k ) , v , u ; long vu ; v = gel ( q , 3 ) ; u = gel ( v , 1 ) ; vu = nfval ( nf , u , pr ) ; if ( ! vu ) continue ; vectrunc_append ( Lr , gel ( v , 2 ) ) ; vectrunc_append ( Ls , gel ( v , 3 ) ) ; vectrunc_append ( Lt , gel ( v , 4 ) ) ; vectrunc_append ( L , pr ) ; vectrunc_append ( U , stoi ( vu ) ) ; } return mkvec5 ( L , U , Lr , Ls , Lt ) ; }
convert vector of localreds to NF_MINIMALPRIMES
convert vector of localreds to NF_MINIMALPRIMES