17#define OSTREAM std::ostream
18#elif defined(HAVE_IOSTREAM_H)
20#define OSTREAM ostream
29#ifndef __GMP_BITS_PER_MP_LIMB
30#define __GMP_BITS_PER_MP_LIMB GMP_LIMB_BITS
32#include <flint/fmpz.h>
33#include <flint/fmpq.h>
73 void*
operator new(size_t)
79 void operator delete(
void* addr, size_t)
88 ASSERT( 0,
"ups there is something wrong in your code" );
93 { mpz_init_set_str(
thempi, str, base ); }
97 const char *
classname()
const {
return "InternalInteger"; }
#define ASSERT(expression, message)
virtual class for internal CanonicalForm's
InternalInteger(const InternalCF &)
InternalCF * dividecoeff(InternalCF *, bool)
InternalCF * deepCopyObject() const
InternalCF * normalizeMyself()
normalizeMyself(), uiNormalizeMyself() - normalize CO.
InternalCF * modsame(InternalCF *)
static InternalCF * uiNormalizeMPI(mpz_ptr)
‘uiNormalizeMPI()’ is the same as ‘normalizeMPI()’ except that ‘aMpi’ is expected to be non-begative.
InternalCF * sqrt()
InternalCF * InternalInteger::sqrt ()
InternalInteger(const mpz_ptr mpi)
InternalInteger(const long i)
friend void gmp_denominator(const CanonicalForm &f, mpz_ptr result)
static const omBin InternalInteger_bin
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
friend class InternalRational
InternalInteger(const char *str, const int base=10)
const char * classname() const
InternalCF * modcoeff(InternalCF *, bool)
InternalCF * mulsame(InternalCF *)
InternalCF * modulocoeff(InternalCF *, bool)
int ilog2()
int InternalInteger::ilog2 ()
InternalCF * bgcdcoeff(const InternalCF *const)
int sign() const
int InternalInteger::sign () const
InternalCF * modulosame(InternalCF *)
InternalCF * divcoeff(InternalCF *, bool)
void divremsame(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * addcoeff(InternalCF *)
InternalCF * subcoeff(InternalCF *, bool)
static InternalCF * normalizeMPI(mpz_ptr)
normalizeMPI(), uiNormalizeMPI() - normalize a mpi.
InternalCF * bgcdsame(const InternalCF *const) const
bool divremsamet(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * bextgcdsame(InternalCF *, CanonicalForm &, CanonicalForm &)
InternalCF * subsame(InternalCF *)
InternalCF * dividesame(InternalCF *)
InternalCF * divsame(InternalCF *)
friend void convertCF2Fmpq(fmpq_t result, const CanonicalForm &f)
conversion of a factory rationals to fmpq_t
InternalCF * bextgcdcoeff(InternalCF *, CanonicalForm &, CanonicalForm &)
InternalCF * mulcoeff(InternalCF *)
InternalCF * neg()
InternalCF * InternalInteger::neg ()
InternalInteger(const int i)
friend void gmp_numerator(const CanonicalForm &f, mpz_ptr result)
void print(OSTREAM &, char *)
int comparesame(InternalCF *)
int comparecoeff(InternalCF *)
friend void getmpi(InternalCF *value, mpz_t mpi)
static mpz_ptr MPI(const InternalCF *const c)
MPI() - return underlying mpz_t of ‘c’.
InternalCF * addsame(InternalCF *)
friend void convertCF2initFmpz(fmpz_t result, const CanonicalForm &f)
conversion of a factory integer to fmpz_t(init.)
friend void convertCF2Fmpz(fmpz *, const CanonicalForm &)
InternalCF * uiNormalizeMyself()
‘uiNormalizeMyself()’ is the same as ‘normalizeMyself()’ except that CO is expected to be non-negativ...
bool divremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool)
utility functions for gmp
bool mpz_is_imm(const mpz_t mpi)
static InternalCF * int2imm(long i)
Factory's internal CanonicalForm's.
#define omTypeAllocBin(type, addr, bin)
#define omFreeBin(addr, bin)