36 if ( mpz_cmp_si(
thempi, 0 ) < 0 ) {
50 mpz_init_set_str(
thempi, str, base );
51 if ( mpz_cmp_si(
thempi, 0 ) < 0 ) {
68 mpz_init_set( dummy,
thempi );
75 if ( mpz_cmp_si(
thempi, 0 ) < 0 ) {
98 ASSERT(
p > 1 &&
k > 0,
"illegal prime power" );
112 if ( *c ==
'*' && mpz_cmp_si(
thempi, 1 ) == 0 )
114 else if ( *c ==
'*' && mpz_cmp_si(
thempi, -1 ) == 0 )
117 char *
str =
new char[mpz_sizeinbase(
thempi, 10 ) + 2];
130 return mpz_cmp_ui(
thempi, 1 ) == 0;
136 return mpz_sgn(
thempi ) == 0;
187 if ( mpz_cmp( dummy,
primepow ) >= 0 )
206 if ( mpz_cmp_si( dummy, 0 ) < 0 )
212 if ( mpz_cmp_si(
thempi, 0 ) < 0 )
251 mpz_init( a ); mpz_init(
b );
255 mpz_t dummy; mpz_init( dummy );
257 ASSERT( mpz_cmp_si( dummy, 1 ) == 0,
"illegal inversion" );
261 if ( mpz_cmp_si(
b, 0 ) < 0 )
269 mpz_t a,
b; mpz_init( a ); mpz_init(
b );
273 mpz_t dummy; mpz_init( dummy );
275 ASSERT( mpz_cmp_si( dummy, 1 ) == 0,
"illegal inversion" );
278 if ( mpz_cmp_si(
b, 0 ) < 0 )
282 mpz_clear( a ); mpz_clear(
b );
310 mpz_init( a ); mpz_init(
b );
314 mpz_t dummy; mpz_init( dummy );
316 ASSERT( mpz_cmp_si( dummy, 1 ) == 0,
"illegal inversion" );
320 if ( mpz_cmp_si(
b, 0 ) < 0 )
348 ASSERT1( 0,
"comparecoeff() not implemented for class %s", this->
classname() );
356 ASSERT( 0,
"this function should never be called" );
363 ASSERT( 0,
"this function should never be called" );
370 ASSERT( 0,
"this function should never be called" );
377 ASSERT( 0,
"this function should never be called" );
384 ASSERT( 0,
"this function should never be called" );
391 ASSERT( 0,
"this function should never be called" );
398 ASSERT( 0,
"this function should never be called" );
405 ASSERT( 0,
"this function should never be called" );
411 ASSERT( 0,
"this function should never be called" );
418 return mpz_get_si(
thempi );
424 return (
int)mpz_fdiv_ui(
thempi, (
unsigned long)
p );
This file defines functions for conversion to FLINT (www.flintlib.org) and back.
#define ASSERT1(expression, message, parameter1)
#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 int levelcoeff() const
InternalCF * addsame(InternalCF *)
bool isOne() const
bool InternalCF::isOne, isZero () const
InternalCF * dividecoeff(InternalCF *, bool)
InternalCF * modulosame(InternalCF *)
InternalCF * mulcoeff(InternalCF *)
void divremsame(InternalCF *, InternalCF *&, InternalCF *&)
static mpz_ptr MPI(const InternalCF *const c)
InternalCF * divsame(InternalCF *)
int comparesame(InternalCF *)
int comparecoeff(InternalCF *)
bool divremsamet(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * mulsame(InternalCF *)
InternalCF * normalize_myself()
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
void print(OSTREAM &, char *)
STATIC_VAR bool initialized
InternalCF * modsame(InternalCF *)
InternalCF * subsame(InternalCF *)
const char * classname() const
bool divremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool)
InternalCF * divcoeff(InternalCF *, bool)
InternalCF * deepCopyObject() const
STATIC_VAR mpz_t primepowhalf
InternalCF * modcoeff(InternalCF *, bool)
InternalCF * addcoeff(InternalCF *)
InternalCF * subcoeff(InternalCF *, bool)
STATIC_VAR mpz_t primepow
InternalCF * dividesame(InternalCF *)
static void setPrimePower(int p, int k)
InternalCF * modulocoeff(InternalCF *, bool)
operations on immediates, that is elements of F_p, GF, Z, Q that fit into intrinsic int,...
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)