bridge/class-master/depend/pari/src/basemath/arith2.c
/* P a t_COL of objects, E a t_VECSMALL of exponents, return cleaned-up
 * factorization (removing 0 exponents) as a t_MAT with 2 cols. */
P a t_COL of objects, E a t_VECSMALL of exponents, return cleaned-up
factorization (removing 0 exponents) as a t_MAT with 2 cols.
P a t_COL of objects E a t_VECSMALL of exponents return cleaned - up factorization ( removing 0 exponents ) as a t_MAT with 2 cols .
static GEN
fa_clean(GEN P, GEN E)
{
  long i, j, l = lg(E);
  GEN Q = cgetg(l, t_COL);
  for (i = j = 1; i < l; i++)
    if (E[i]) { gel(Q,j) = gel(P,i); E[j] = E[i]; j++; }
  setlg(Q,j);
  setlg(E,j); return mkmat2(Q,Flc_to_ZC(E));
}
static GEN fa_clean ( GEN P , GEN E ) { long i , j , l = lg ( E ) ; GEN Q = cgetg ( l , t_COL ) ; for ( i = j = 1 ; i < l ; i ++ ) if ( E [ i ] ) { gel ( Q , j ) = gel ( P , i ) ; E [ j ] = E [ i ] ; j ++ ; } setlg ( Q , j ) ; setlg ( E , j ) ; return mkmat2 ( Q , Flc_to_ZC ( E ) ) ; }
P a t_COL of objects, E a t_VECSMALL of exponents, return cleaned-up
 factorization (removing 0 exponents) as a t_MAT with 2 cols.
P a t_COL of objects E a t_VECSMALL of exponents return cleaned - up factorization ( removing 0 exponents ) as a t_MAT with 2 cols .