bridge/class-master/depend/pari/src/basemath/FpXX.c
/* Q an FpXY, evaluate at Y = y */
Q an FpXY, evaluate at Y = y
Q an FpXY evaluate at Y = y
GEN
FpXY_evaly(GEN Q, GEN y, GEN p, long vx)
{
  pari_sp av = avma;
  long i, lb = lg(Q);
  GEN z;
  if (!signe(Q)) return pol_0(vx);
  if (lb == 3 || !signe(y)) {
    z = gel(Q, 2);
    return typ(z)==t_INT? scalar_ZX(z, vx): ZX_copy(z);
  }
  z = gel(Q, lb-1);
  if (typ(z) == t_INT) z = scalar_ZX_shallow(z, vx);
  for (i=lb-2; i>=2; i--) z = Fq_add(gel(Q,i), FpX_Fp_mul(z, y, p), NULL, p);
  return gerepileupto(av, z);
}
GEN FpXY_evaly ( GEN Q , GEN y , GEN p , long vx ) { pari_sp av = avma ; long i , lb = lg ( Q ) ; GEN z ; if ( ! signe ( Q ) ) return pol_0 ( vx ) ; if ( lb == 3 || ! signe ( y ) ) { z = gel ( Q , 2 ) ; return typ ( z ) == t_INT ? scalar_ZX ( z , vx ) : ZX_copy ( z ) ; } z = gel ( Q , lb - 1 ) ; if ( typ ( z ) == t_INT ) z = scalar_ZX_shallow ( z , vx ) ; for ( i = lb - 2 ; i >= 2 ; i -- ) z = Fq_add ( gel ( Q , i ) , FpX_Fp_mul ( z , y , p ) , NULL , p ) ; return gerepileupto ( av , z ) ; }
Q an FpXY, evaluate at Y = y
Q an FpXY evaluate at Y = y