bridge/class-master/depend/pari/src/basemath/lfun.c
/* normalize the description of a polar part */
normalize the description of a polar part
normalize the description of a polar part
static GEN
normalizepoles(GEN r, long k)
{
  long iv, j, l;
  GEN v;
  if (!is_vec_t(typ(r))) return normalize_simple_pole(r, stoi(k));
  v = cgetg_copy(r, &l);
  for (j = iv = 1; j < l; j++)
  {
    GEN rj = gel(r,j), a = gel(rj,1), ra = gel(rj,2);
    if (!is_scalar_t(typ(a)) || typ(ra) != t_SER)
      pari_err_TYPE("lfunrootres [poles]",r);
    if (valp(ra) >= 0) continue;
    gel(v,iv++) = rj;
  }
  setlg(v, iv); return v;
}
static GEN normalizepoles ( GEN r , long k ) { long iv , j , l ; GEN v ; if ( ! is_vec_t ( typ ( r ) ) ) return normalize_simple_pole ( r , stoi ( k ) ) ; v = cgetg_copy ( r , & l ) ; for ( j = iv = 1 ; j < l ; j ++ ) { GEN rj = gel ( r , j ) , a = gel ( rj , 1 ) , ra = gel ( rj , 2 ) ; if ( ! is_scalar_t ( typ ( a ) ) || typ ( ra ) != t_SER ) pari_err_TYPE ( " " , r ) ; if ( valp ( ra ) >= 0 ) continue ; gel ( v , iv ++ ) = rj ; } setlg ( v , iv ) ; return v ; }
normalize the description of a polar part
normalize the description of a polar part