14 if (
f.inCoeffDomain() ||
g.inCoeffDomain())
27 pi =
g; pi1 =
f; delta = -delta;
29 if (
pi.isUnivariate())
74 return gcd_univar_ntlp(
pi, pi1 ) * C;
105 C *=
gcd (oldPi, oldPi1);
117 C *=
gcd (oldPi, oldPi1);
124 powHi=
power (Hi, delta-1);
126 bi =
LC(
pi,
v ) * powHi*Hi;
128 bi = -
LC(
pi,
v ) * powHi*Hi;
129 Hi =
power(
LC( pi1,
v ), delta ) / powHi;
135 C *=
gcd (oldPi, oldPi1);
148 if (!
pi.isUnivariate())
179 pi =
g; pi1 =
f; delta = -delta;
182 pi1 = pi1 / Ci1;
pi =
pi / Ci;
192 return gcd_univar_ntl0(
pi, pi1 ) * C;
203 else if (
gcd(pi1,
pi)==1)
Rational abs(const Rational &a)
Extended Zassenhaus GCD over finite fields and Z.
bool gcd_test_one(const CanonicalForm &f, const CanonicalForm &g, bool swap, int &d)
Coprimality Check. f and g are assumed to have the same level. If swap is true, the main variables of...
coprimality check and change of representation mod n
CanonicalForm subResGCD_p(const CanonicalForm &f, const CanonicalForm &g)
subresultant GCD over finite fields. In case things become too dense we switch to a modular algorithm
CanonicalForm subResGCD_0(const CanonicalForm &f, const CanonicalForm &g)
subresultant GCD over Z.
univariate Gcd over finite fields and Z, extended GCD over finite fields and Q
CanonicalForm psr(const CanonicalForm &rr, const CanonicalForm &vv, const Variable &x)
CanonicalForm psr ( const CanonicalForm & f, const CanonicalForm & g, const Variable & x )
declarations of higher level algorithms.
bool isPurePoly(const CanonicalForm &f)
static const int SW_USE_EZGCD_P
set to 1 to use EZGCD over F_q
static const int SW_USE_FF_MOD_GCD
set to 1 to use modular GCD over F_q
#define GaloisFieldDomain
Interface to generate InternalCF's over various domains from intrinsic types or mpz_t's.
static CanonicalForm gcd_univar_flintp(const CanonicalForm &F, const CanonicalForm &G)
static CanonicalForm gcd_poly_univar0(const CanonicalForm &F, const CanonicalForm &G, bool primitive)
static CanonicalForm gcd_univar_flint0(const CanonicalForm &F, const CanonicalForm &G)
factory's class for variables
const Variable & v
< [in] a sqrfree bivariate poly
some useful template functions.
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)