bridge/class-master/depend/pari/src/basemath/alglin2.c
/* compute charpoly by mapping to Fp first, return lift to Z */
compute charpoly by mapping to Fp first, return lift to Z
compute charpoly by mapping to Fp first return lift to Z
static GEN
RgM_Fp_charpoly(GEN x, GEN p, long v)
{
  GEN T;
  if (lgefint(p) == 3)
  {
    ulong pp = itou(p);
    T = Flm_charpoly_i(RgM_to_Flm(x, pp), pp);
    T = Flx_to_ZX(T);
  }
  else
    T = FpM_charpoly(RgM_to_FpM(x, p), p);
  setvarn(T, v); return T;
}
static GEN RgM_Fp_charpoly ( GEN x , GEN p , long v ) { GEN T ; if ( lgefint ( p ) == 3 ) { ulong pp = itou ( p ) ; T = Flm_charpoly_i ( RgM_to_Flm ( x , pp ) , pp ) ; T = Flx_to_ZX ( T ) ; } else T = FpM_charpoly ( RgM_to_FpM ( x , p ) , p ) ; setvarn ( T , v ) ; return T ; }
compute charpoly by mapping to Fp first, return lift to Z
compute charpoly by mapping to Fp first return lift to Z