48 ASSERT( d != 0,
"divide by zero" );
56 long g =
intgcd( (
long) n, (
long) d );
78 ASSERT( d != 0,
"divide by zero" );
103 ASSERT( 0,
"fatal error" );
#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()
virtual bool isZero() const
virtual int levelcoeff() const
virtual InternalCF * invert()
virtual bool isOne() const
bool InternalCF::isOne, isZero () const
static mpz_ptr MPI(const InternalCF *const c)
MPI() - return underlying mpz_t of ācā.
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
InternalCF * divsame(InternalCF *)
InternalCF * bextgcdcoeff(InternalCF *, CanonicalForm &, CanonicalForm &)
InternalCF * subcoeff(InternalCF *, bool)
InternalCF * normalize_myself()
reduce InternalRational to lowest terms
int comparesame(InternalCF *)
comparesame(), comparecoeff() - compare with an InternalRational.
friend class InternalInteger
InternalCF * modsame(InternalCF *)
InternalCF * addsame(InternalCF *)
InternalCF * bgcdcoeff(const InternalCF *const)
bool divremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool)
bool divremsamet(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * bextgcdsame(InternalCF *, CanonicalForm &, CanonicalForm &)
InternalCF * bgcdsame(const InternalCF *const) const
InternalCF * mulsame(InternalCF *)
InternalCF * modcoeff(InternalCF *, bool)
InternalCF * deepCopyObject() const
void divremsame(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * divcoeff(InternalCF *, bool)
InternalCF * dividecoeff(InternalCF *, bool)
InternalCF * dividesame(InternalCF *)
InternalCF * neg()
InternalCF * InternalRational::neg ()
InternalCF * addcoeff(InternalCF *)
static mpz_ptr MPQDEN(const InternalCF *const c)
InternalCF * modulosame(InternalCF *)
void print(OSTREAM &, char *)
int comparecoeff(InternalCF *)
comparecoeff() compares the CO=a/b and the integer c using the equivalence a/b < c iff a < c*b.
InternalCF * subsame(InternalCF *)
static mpz_ptr MPQNUM(const InternalCF *const c)
InternalCF * modulocoeff(InternalCF *, bool)
InternalCF * mulcoeff(InternalCF *)
utility functions for gmp
bool mpz_is_imm(const mpz_t mpi)
operations on immediates, that is elements of F_p, GF, Z, Q that fit into intrinsic int,...
static long imm2int(const InternalCF *const imm)
static InternalCF * int2imm(long i)
Factory's internal integers.
static long intgcd(long a, long b)
Factory's internal rationals.
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)