bridge/class-master/depend/pari/src/basemath/FpX_factor.c
/*******************************************************************/
/*                                                                 */
/*           ROOTS MODULO a prime p (no multiplicities)            */
/*                                                                 */
/*******************************************************************/
/* Replace F by a monic normalized FpX having the same factors;
 * assume p prime and *F a ZX */
ROOTS MODULO a prime p (no multiplicities)

Replace F by a monic normalized FpX having the same factors;
assume p prime and *F a ZX
ROOTS MODULO a prime p ( no multiplicities ) Replace F by a monic normalized FpX having the same factors ; assume p prime and * F a ZX
static int
ZX_factmod_init(GEN *F, GEN p)
{
  if (lgefint(p) == 3)
  {
    ulong pp = p[2];
    if (pp == 2) { *F = ZX_to_F2x(*F); return 0; }
    *F = ZX_to_Flx(*F, pp);
    if (lg(*F) > 3) *F = Flx_normalize(*F, pp);
    return 1;
  }
  *F = FpX_red(*F, p);
  if (lg(*F) > 3) *F = FpX_normalize(*F, p);
  return 2;
}
static int ZX_factmod_init ( GEN * F , GEN p ) { if ( lgefint ( p ) == 3 ) { ulong pp = p [ 2 ] ; if ( pp == 2 ) { * F = ZX_to_F2x ( * F ) ; return 0 ; } * F = ZX_to_Flx ( * F , pp ) ; if ( lg ( * F ) > 3 ) * F = Flx_normalize ( * F , pp ) ; return 1 ; } * F = FpX_red ( * F , p ) ; if ( lg ( * F ) > 3 ) * F = FpX_normalize ( * F , p ) ; return 2 ; }
ROOTS MODULO a prime p (no multiplicities)
ROOTS MODULO a prime p ( no multiplicities )