bridge/class-master/depend/pari/src/basemath/base3.c
/* as tablemul_ei, assume x a ZV of correct length */
as tablemul_ei, assume x a ZV of correct length
as tablemul_ei assume x a ZV of correct length
GEN
zk_ei_mul(GEN nf, GEN x, long i)
{
  long j, k, N;
  GEN v, tab;
  if (i==1) return ZC_copy(x);
  tab = get_tab(nf, &N); tab += (i-1)*N;
  v = cgetg(N+1,t_COL);
  for (k=1; k<=N; k++)
  {
    pari_sp av = avma;
    GEN s = gen_0;
    for (j=1; j<=N; j++)
    {
      GEN c = gcoeff(tab,k,j);
      if (signe(c)) s = addii(s, _mulii(c, gel(x,j)));
    }
    gel(v,k) = gerepileuptoint(av, s);
  }
  return v;
}
GEN zk_ei_mul ( GEN nf , GEN x , long i ) { long j , k , N ; GEN v , tab ; if ( i == 1 ) return ZC_copy ( x ) ; tab = get_tab ( nf , & N ) ; tab += ( i - 1 ) * N ; v = cgetg ( N + 1 , t_COL ) ; for ( k = 1 ; k <= N ; k ++ ) { pari_sp av = avma ; GEN s = gen_0 ; for ( j = 1 ; j <= N ; j ++ ) { GEN c = gcoeff ( tab , k , j ) ; if ( signe ( c ) ) s = addii ( s , _mulii ( c , gel ( x , j ) ) ) ; } gel ( v , k ) = gerepileuptoint ( av , s ) ; } return v ; }
as tablemul_ei, assume x a ZV of correct length
as tablemul_ei assume x a ZV of correct length