9#if defined(WINNT) && ! defined(__GNUC__)
34#define LIKELY(X) (__builtin_expect(!!(X), 1))
35#define UNLIKELY(X) (__builtin_expect(!!(X), 0))
38#define UNLIKELY(X) (X)
55 ASSERT( 0,
"ups, why do you initialize an empty poly" );
67 ASSERT( 0,
"ups there is something wrong in your code" );
91 cursor = cursor->
next;
311 if ( first && first->
exp != 0 )
351 if ( first && first->
exp != 0 )
533 while (first && ( first->
exp >=
exp ) )
562 ASSERT( 0,
"FATAL ERROR, PLEASE INFORM THE AUTHOR" );
629 while (first && ( first->
exp >=
exp ) )
665 ASSERT( 0,
"FATAL ERROR, PLEASE INFORM THE AUTHOR" );
717 while (first && ( first->
exp >=
exp ) )
727 if ( first && first->
exp != 0 )
750 if ( first && first->
exp != 0 )
784 while (first && ( first->
exp >=
exp ) )
804 if ( first->
exp == 0 )
864 if ( first->
exp == 0 )
939 if ( first->
exp == 0 )
1056 cursor = cursor->
next;
1073 if (
last->exp == 0 )
1076 if (
last->coeff.isZero() )
1080 cursor = cursor->
next;
1130 cursor = cursor->
next;
1153 if (
last->exp == 0 )
1159 if (
last->coeff.isZero() )
1163 cursor = cursor->
next;
1199 else if ( c.
isOne() )
1287 if ( first && first->
exp != 0 )
1382 if ( first && first->
exp != 0 )
1408 dummy =
dummy->mulcoeff(
cc );
1459 if ( first && first->
exp != 0 )
1558 if ( first && first->
exp != 0 )
1636 if ( first && first->
exp != 0 )
1667 rem =
cc->copyObject();
1705 rem =
cc->copyObject();
1725 if ( !
cquot.isZero() )
1730 cursor = cursor->
next;
1773 rem =
cc->copyObject();
1798 if ( !
cquot.isZero() )
1803 cursor = cursor->
next;
1906 cursor = cursor->
next;
1919 cursor = cursor->
next;
1946 theList = theList->
next;
1994 theList = theList->
next;
2211 theList = theList->
next;
2275 while ( first && ( first->
exp >=
exp ) )
CanonicalForm extgcd(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &a, CanonicalForm &b)
CanonicalForm extgcd ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & a,...
univariate Gcd over finite fields and Z, extended GCD over finite fields and Q
#define ASSERT(expression, message)
Interface to generate InternalCF's over various domains from intrinsic types or mpz_t's.
static InternalCF * basic(int value)
virtual class for internal CanonicalForm's
InternalCF * copyObject()
factory's class for integers
factory's class for polynomials
InternalCF * addsame(InternalCF *)
static termList divideTermList(termList, const CanonicalForm &, termList &)
static termList addTermList(termList, termList, termList &, bool negate)
InternalCF * mulcoeff(InternalCF *)
void print(OSTREAM &, char *)
static termList reduceTermList(termList first, termList redterms, termList &last)
InternalCF * modsame(InternalCF *)
int degree()
int InternalPoly::degree ()
static void freeTermList(termList)
InternalCF * deepCopyObject() const
bool divremsamet(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * neg()
InternalCF * InternalPoly::neg ()
InternalCF * tryDivcoeff(InternalCF *, bool, const CanonicalForm &, bool &)
static const omBin InternalPoly_bin
static void mulTermList(termList, const CanonicalForm &, const int)
bool isUnivariate() const
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
int comparesame(InternalCF *)
comparesame(), comparecoeff() - compare with an InternalPoly.
InternalCF * tryDividecoeff(InternalCF *, bool, const CanonicalForm &, bool &)
InternalCF * modulocoeff(InternalCF *, bool)
InternalCF * subsame(InternalCF *)
InternalCF * divcoeff(InternalCF *, bool)
InternalCF * modcoeff(InternalCF *, bool)
InternalCF * modulosame(InternalCF *)
static void negateTermList(termList)
static termList tryDivTermList(termList, const CanonicalForm &, termList &, const CanonicalForm &, bool &)
static termList mulAddTermList(termList theList, termList aList, const CanonicalForm &c, const int exp, termList &lastTerm, bool negate)
bool tryDivremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool, const CanonicalForm &, bool &)
void divremsame(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * dividesame(InternalCF *)
bool divremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool)
CanonicalForm coeff(int i)
CanonicalForm InternalPoly::coeff ( int i )
InternalCF * dividecoeff(InternalCF *, bool)
int comparecoeff(InternalCF *)
comparecoeff() always returns 1 since CO is defined to be larger than anything which is a coefficient...
CanonicalForm tailcoeff()
CanonicalForm InternalPoly::tailcoeff (), int InternalPoly::taildegree ()
static termList deepCopyTermList(termList, termList &)
InternalCF * divsame(InternalCF *)
InternalCF * addcoeff(InternalCF *)
InternalCF * subcoeff(InternalCF *, bool)
bool tryDivremsamet(InternalCF *, InternalCF *&, InternalCF *&, const CanonicalForm &, bool &)
static termList modTermList(termList, const CanonicalForm &, termList &)
static termList copyTermList(termList, termList &, bool negate=false)
static void appendTermList(termList &, termList &, const CanonicalForm &, const int)
static termList divTermList(termList, const CanonicalForm &, termList &)
InternalCF * mulsame(InternalCF *)
InternalCF * tryInvert(const CanonicalForm &, bool &)
InternalCF * tryMulsame(InternalCF *, const CanonicalForm &)
int sign() const
int InternalPoly::sign () const
InternalCF * tryDivsame(InternalCF *, const CanonicalForm &, bool &)
void print(OSTREAM &) const
factory's class for variables
static const omBin term_bin
const Variable & v
< [in] a sqrfree bivariate poly
void setReduce(const Variable &alpha, bool reduce)
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
operations on immediates, that is elements of F_p, GF, Z, Q that fit into intrinsic int,...
static long imm2int(const InternalCF *const imm)
Factory's internal CanonicalForm's.
Factory's internal integers.
Factory's internal polynomials.
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)
gmp_float exp(const gmp_float &a)
#define omGetSpecBin(size)
bool getReduce(const Variable &alpha)
InternalPoly * getInternalMipo(const Variable &alpha)