16#define OSTREAM std::ostream
17#elif defined(HAVE_IOSTREAM_H)
19#define OSTREAM ostream
46 static void normalize(
const mpz_ptr,
const mpz_ptr, mpz_ptr, mpz_ptr );
51 ASSERT( 0,
"ups there is something wrong in your code" );
62 const char *
classname()
const {
return "InternalRational"; }
#define ASSERT(expression, message)
virtual class for internal CanonicalForm's
virtual void print(OSTREAM &, char *) PVIRT_VOID("print")
factory's class for integers
factory's class for rationals
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
InternalCF * divsame(InternalCF *)
STATIC_VAR int initialized
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 void gmp_denominator(const CanonicalForm &f, mpz_ptr result)
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)
friend CanonicalForm make_cf(const mpz_ptr n, const mpz_ptr d)
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 *)
friend void gmp_numerator(const CanonicalForm &f, mpz_ptr result)
static mpz_ptr MPQDEN(const InternalCF *const c)
InternalCF * modulosame(InternalCF *)
const char * classname() const
int comparecoeff(InternalCF *)
comparecoeff() compares the CO=a/b and the integer c using the equivalence a/b < c iff a < c*b.
InternalRational(const InternalCF &)
InternalCF * subsame(InternalCF *)
static void normalize(const mpz_ptr, const mpz_ptr, mpz_ptr, mpz_ptr)
static mpz_ptr MPQNUM(const InternalCF *const c)
InternalCF * modulocoeff(InternalCF *, bool)
InternalCF * mulcoeff(InternalCF *)
operations on immediates, that is elements of F_p, GF, Z, Q that fit into intrinsic int,...
Factory's internal CanonicalForm's.