28 #if defined(HAVE_FLINT) && (__FLINT_RELEASE >= 20503)
31 nmod_poly_factor_t fac;
32 nmod_poly_factor_init(fac);
33 nmod_poly_roots(fac,FLINT_f,0);
37 for(
int i=fac->num-1;
i>=0;
i--)
40 if (nmod_poly_length(fac->p+
i)==2)
42 res[
j]=
p-nmod_poly_get_coeff_ui(fac->p+
i,0);
49 nmod_poly_factor_clear(fac);
51 #elif defined(HAVE_NTL)
58 vec_zz_p roots= FindRoots (NTL_f);
60 res[0]=roots.length();
61 for(
int i=roots.length()-1;
i>=0;
i--)
63 res[
i+1]=to_long(rep(roots[
i]));
This file defines functions for conversion to FLINT (www.flintlib.org) and back.
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
Conversion to and from NTL.
Iterators for CanonicalForm's.
int * Zp_roots(const CanonicalForm f)
VAR void(* factoryError)(const char *s)
functions to print debug output
convertFacCF2nmod_poly_t(FLINTmipo, M)
nmod_poly_clear(FLINTmipo)
operations on immediates, that is elements of F_p, GF, Z, Q that fit into intrinsic int,...