bridge/class-master/depend/pari/src/basemath/base2.c
/* Assume f reduced mod p, otherwise valuation at x may be wrong */
Assume f reduced mod p, otherwise valuation at x may be wrong
Assume f reduced mod p otherwise valuation at x may be wrong
static GEN
FpX_radical(GEN f, GEN p)
{
  GEN u;
  long v0;
  if (lgefint(p) == 3)
  {
    ulong q = p[2];
    return Flx_to_ZX( Flx_radical(ZX_to_Flx(f, q), q) );
  }
  v0 = ZX_valrem(f, &f);
  u = FpX_gcd(f,FpX_deriv(f, p), p);
  if (degpol(u)) f = FpX_div(f, u, p);
  if (v0) f = RgX_shift(f, 1);
  return f;
}
static GEN FpX_radical ( GEN f , GEN p ) { GEN u ; long v0 ; if ( lgefint ( p ) == 3 ) { ulong q = p [ 2 ] ; return Flx_to_ZX ( Flx_radical ( ZX_to_Flx ( f , q ) , q ) ) ; } v0 = ZX_valrem ( f , & f ) ; u = FpX_gcd ( f , FpX_deriv ( f , p ) , p ) ; if ( degpol ( u ) ) f = FpX_div ( f , u , p ) ; if ( v0 ) f = RgX_shift ( f , 1 ) ; return f ; }
Assume f reduced mod p, otherwise valuation at x may be wrong
Assume f reduced mod p otherwise valuation at x may be wrong