8#if SI_INTEGER_VARIANT == 3
9#define POW_2_28 (1L<<60)
17#define nrzTest(A) nrzDBTest(A,__FILE__,__LINE__,NULL)
42 if ((((
ui<<3)>>3)==
ui)
243static long int_extgcd(
long a,
long b,
long * u,
long*
x,
long *
v,
long*
y)
534 if (*a ==
NULL)
return;
658 return ((
long)a)>((
long)
b);
876 WerrorS(
"Non invertible element.");
899 PrintS(
"Farey start with ");
990 WerrorS(
"rational in map to integer");
1036 if ((((
ui<<3)>>3)==
ui)
1039 Print(
"gmp-small %s:%d\n",
f,
l);
1076 const char * start=
s;
1078 if (*
s<
'0' || *
s>
'9')
1083 while (*
s >=
'0' && *
s <=
'9')
s++;
1137 WerrorS(
"rational in conversion to integer");
1176 long ch = r->cfInt(c, r);
1259 r->has_simple_Alloc=
FALSE;
1260 r->has_simple_Inverse=
FALSE;
Rational abs(const Rational &a)
const CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
number ndCopyMap(number a, const coeffs src, const coeffs dst)
@ n_Q
rational (GMP) numbers
@ n_Zn
only used if HAVE_RINGS is defined
@ n_Z
only used if HAVE_RINGS is defined
void n_Print(number &a, const coeffs r)
print a number (BEWARE of string buffers!) mostly for debugging
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
@ n_rep_gap_rat
(number), see longrat.h
@ n_rep_gap_gmp
(), see rinteger.h, new impl.
@ n_rep_int
(int), see modulop.h
@ n_rep_gmp
(mpz_ptr), see rmodulon,h
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void nKillChar(coeffs r)
undo all initialisations
const CanonicalForm int s
const CanonicalForm int const CFList const Variable & y
const Variable & v
< [in] a sqrfree bivariate poly
CanonicalForm FACTORY_PUBLIC make_cf(const mpz_ptr n)
void FACTORY_PUBLIC gmp_numerator(const CanonicalForm &f, mpz_ptr result)
void WerrorS(const char *s)
void nlWriteFd(number n, const ssiInfo *d, const coeffs)
void mpz_mul_si(mpz_ptr r, mpz_srcptr s, long int si)
number nlChineseRemainderSym(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs CF)
number nlReadFd(const ssiInfo *d, const coeffs)
static int int_extgcd(int a, int b, int *u, int *x, int *v, int *y)
The main handler for Singular numbers which are suitable for Singular polynomials.
const char *const nDivBy0
#define omFreeSize(addr, size)
#define omFreeBin(addr, bin)
void StringSetS(const char *st)
void StringAppendS(const char *st)
void PrintS(const char *s)
static char * nrzCoeffName(const coeffs)
void nrzWrite(number a, const coeffs r)
void nrzDelete(number *a, const coeffs)
int nrzSize(number a, const coeffs)
BOOLEAN nrzInitChar(coeffs r, void *parameter)
number nrzInit(long i, const coeffs r)