bridge/class-master/depend/pari/src/basemath/base3.c
/* remove prime ideals of norm 2 with exponent 1 from factorization */
remove prime ideals of norm 2 with exponent 1 from factorization
remove prime ideals of norm 2 with exponent 1 from factorization
static GEN
famat_strip2(GEN fa)
{
  GEN P = gel(fa,1), E = gel(fa,2), Q, F;
  long l = lg(P), i, j;
  Q = cgetg(l, t_COL);
  F = cgetg(l, t_COL);
  for (i = j = 1; i < l; i++)
  {
    GEN pr = gel(P,i), e = gel(E,i);
    if (!absequaliu(pr_get_p(pr), 2) || itou(e) != 1 || pr_get_f(pr) != 1)
    {
      gel(Q,j) = pr;
      gel(F,j) = e; j++;
    }
  }
  setlg(Q,j);
  setlg(F,j); return mkmat2(Q,F);
}
static GEN famat_strip2 ( GEN fa ) { GEN P = gel ( fa , 1 ) , E = gel ( fa , 2 ) , Q , F ; long l = lg ( P ) , i , j ; Q = cgetg ( l , t_COL ) ; F = cgetg ( l , t_COL ) ; for ( i = j = 1 ; i < l ; i ++ ) { GEN pr = gel ( P , i ) , e = gel ( E , i ) ; if ( ! absequaliu ( pr_get_p ( pr ) , 2 ) || itou ( e ) != 1 || pr_get_f ( pr ) != 1 ) { gel ( Q , j ) = pr ; gel ( F , j ) = e ; j ++ ; } } setlg ( Q , j ) ; setlg ( F , j ) ; return mkmat2 ( Q , F ) ; }
remove prime ideals of norm 2 with exponent 1 from factorization
remove prime ideals of norm 2 with exponent 1 from factorization