62 while ( ( r0 > 0 ) && ( r1 > 0 ) ) {
92 if (
f.inCoeffDomain() )
117 ASSERT( (
f.inCoeffDomain() ||
f.isUnivariate()) && (
g.inCoeffDomain() ||
g.isUnivariate()) && (
f.inCoeffDomain() ||
g.inCoeffDomain() ||
f.mvar() ==
g.mvar()),
"can not build remainder" );
118 if (
f.inCoeffDomain() )
119 if (
g.inCoeffDomain() )
126 int degg =
g.degree();
171 for (
int i =
f;
i <=
l;
i++ )
192 (void)
extgcd( amodp, bmodp, smodp, tmodp );
197 for (
j = 1;
j <
k;
j++ ) {
198 e = ( 1 -
s * a - t *
b ) / modulus;
204 divrem( sigmat, bmodp, q, sigma );
205 tau = taut + q * amodp;
void tau(int **points, int sizePoints, int k)
univariate Gcd over finite fields and Z, extended GCD over finite fields and Q
#define ASSERT(expression, message)
Iterators for CanonicalForm's.
factory's class for variables
class to do operations mod p^k for int's p and k
CanonicalForm operator()(const CanonicalForm &f, bool symmetric=true) const
modpk & operator=(const modpk &m)
CanonicalForm inverse(const CanonicalForm &f, bool symmetric=true) const
const CanonicalForm int s
static CanonicalForm mappksymmetric(const CanonicalForm &)
void extgcd(const CanonicalForm &a, const CanonicalForm &b, CanonicalForm &S, CanonicalForm &T, const modpk &pk)
STATIC_INST_VAR CanonicalForm PKHALF
CanonicalForm remainder(const CanonicalForm &f, const CanonicalForm &g, const modpk &pk)
STATIC_INST_VAR CanonicalForm PK
static CanonicalForm mappk(const CanonicalForm &)
CanonicalForm replaceLc(const CanonicalForm &f, const CanonicalForm &c)
operations mod p^k and some other useful functions for factorization