26{
28 #if defined(HAVE_FLINT) && (__FLINT_RELEASE >= 20503)
29 nmod_poly_t FLINT_f;
31 nmod_poly_factor_t fac;
32 nmod_poly_factor_init(fac);
33 nmod_poly_roots(fac,FLINT_f,0);
35
37 for(
int i=fac->num-1;
i>=0;
i--)
38 {
39
40 if (nmod_poly_length(fac->p+
i)==2)
41 {
42 res[
j]=
p-nmod_poly_get_coeff_ui(fac->p+
i,0);
44 }
45 }
47
49 nmod_poly_factor_clear(fac);
51 #elif defined(HAVE_NTL)
53 {
56 }
58 vec_zz_p roots= FindRoots (NTL_f);
60 res[0]=roots.length();
61 for(
int i=roots.length()-1;
i>=0;
i--)
62 {
63 res[
i+1]=to_long(rep(roots[
i]));
64 }
66 #else
69 #endif
70}
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
VAR void(* factoryError)(const char *s)
convertFacCF2nmod_poly_t(FLINTmipo, M)
nmod_poly_clear(FLINTmipo)