modular gcd over F_p[x]/(M) for not necessarily irreducible M. If a zero divisor is encountered fail is set to true.
400 result=
reduce (result, M);
419 result=
reduce (result, M);
458 Variable
v= M.
mvar();
465 zz_pE::init (NTLMipo);
481 tryEuclid(f,g,M,result,fail);
486 result= NN (
reduce (result, M));
506 tryEuclid(
cf,
cg,M,c,fail);
511 f.tryDiv (
cf, M, fail);
515 g.tryDiv (
cg, M, fail);
519 if(f.inCoeffDomain())
527 if(g.inCoeffDomain())
535 int *L =
new int[mv+1];
536 int *
N =
new int[mv+1];
537 for(
int i=2;
i<=mv;
i++)
556 for(
int i=2; i<=mv; i++)
560 int *dg_im = new
int[mv+1];
561 for(
int i=2; i<=mv; i++)
567 Variable
x= Variable (1);
569 for(FFGenerator gen = FFGenerator(); gen.hasItems(); gen.
next())
572 gamma_image =
reduce(gamma(alpha,
x),M);
578 "time
for recursive calls in alg
gcd mod p: ")
581 g_image =
reduce(g_image, M);
582 if(g_image.inCoeffDomain())
590 for(
int i=2; i<=mv; i++)
592 dg_im =
leadDeg(g_image, dg_im);
600 g_image *= gamma_image;
601 g_image=
reduce (g_image, M);
612 if((
firstLC(gnew) == gamma) || (gnew == gm))
620 g_image.tryDiv (
cf, M, fail);
633 result = NN(
reduce (c*g_image, M));
635 "time for successful termination test in alg gcd mod p: ")
652 for(
int i=2; i<=mv; i++)
for(int i=0;i<=n;i++) degsf[i]
ideal interpolation(const std::vector< ideal > &L, intvec *v)
#define TIMING_END_AND_PRINT(t, msg)
factory's class for variables
generate all elements in F_p starting from 0
int myCompress(const CanonicalForm &F, const CanonicalForm &G, CFMap &M, CFMap &N, bool topLevel)
compressing two polynomials F and G, M is used for compressing, N to reverse the compression ...
const CanonicalForm CFMap CFMap bool topLevel
void tryInvert(const CanonicalForm &F, const CanonicalForm &M, CanonicalForm &inv, bool &fail)
bool isLess(int *a, int *b, int lower, int upper)
const CanonicalForm CFMap CFMap & N
zz_pEX convertFacCF2NTLzz_pEX(const CanonicalForm &f, const zz_pX &mipo)
CanonicalForm firstLC(const CanonicalForm &f)
int * leadDeg(const CanonicalForm &f, int *degs)
static CanonicalForm tryvcontent(const CanonicalForm &f, const Variable &x, const CanonicalForm &M, bool &fail)
CanonicalForm convertNTLzz_pEX2CF(const zz_pEX &f, const Variable &x, const Variable &alpha)
bool isEqual(int *a, int *b, int lower, int upper)
const Variable & v
< [in] a sqrfree bivariate poly
static CanonicalForm tryNewtonInterp(const CanonicalForm &alpha, const CanonicalForm &u, const CanonicalForm &newtonPoly, const CanonicalForm &oldInterPoly, const Variable &x, const CanonicalForm &M, bool &fail)
void tryNTLGCD(zz_pEX &x, const zz_pEX &a, const zz_pEX &b, bool &fail)
compute the GCD x of a and b, fail is set to true if a zero divisor is encountered ...
zz_pX convertFacCF2NTLzzpX(const CanonicalForm &f)
void tryBrownGCD(const CanonicalForm &F, const CanonicalForm &G, const CanonicalForm &M, CanonicalForm &result, bool &fail, bool topLevel)
modular gcd over F_p[x]/(M) for not necessarily irreducible M. If a zero divisor is encountered fail ...
bool tryFdivides(const CanonicalForm &f, const CanonicalForm &g, const CanonicalForm &M, bool &fail)
same as fdivides but handles zero divisors in Z_p[t]/(f)[x1,...,xn] for reducible f ...