My Project  UNKNOWN_GIT_VERSION
Data Structures | Macros | Functions
longrat.h File Reference
#include "misc/auxiliary.h"
#include "coeffs/si_gmp.h"
#include "coeffs/coeffs.h"

Go to the source code of this file.

Data Structures

struct  number
 'SR_INT' is the type of those integers small enough to fit into 29 bits. More...
 

Macros

#define SR_HDL(A)   ((long)(A))
 
#define SR_INT   1L
 
#define INT_TO_SR(INT)   ((number) (((long)INT << 2) + SR_INT))
 
#define SR_TO_INT(SR)   (((long)SR) >> 2)
 
#define MP_SMALL   1
 

Functions

number nlGetDenom (number &n, const coeffs r)
 
number nlGetNumerator (number &n, const coeffs r)
 
BOOLEAN nlInitChar (coeffs, void *)
 
static FORCE_INLINE int nlQlogSize (number n, const coeffs r)
 only used by slimgb (tgb.cc) More...
 
static FORCE_INLINE BOOLEAN nlIsInteger (number q, const coeffs r)
 
number nlModP (number q, const coeffs Q, const coeffs Zp)
 
void nlNormalize (number &x, const coeffs r)
 
void nlInpGcd (number &a, number b, const coeffs r)
 
void nlDelete (number *a, const coeffs r)
 
number nlInit2 (int i, int j, const coeffs r)
 create a rational i/j (implicitly) over Q NOTE: make sure to use correct Q in debug mode More...
 
number nlInit2gmp (mpz_t i, mpz_t j, const coeffs r)
 create a rational i/j (implicitly) over Q NOTE: make sure to use correct Q in debug mode More...
 
void nlGMP (number &i, mpz_t n, const coeffs r)
 
number nlMapGMP (number from, const coeffs src, const coeffs dst)
 
number nlChineseRemainderSym (number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs CF)
 

Data Structure Documentation

◆ snumber

struct snumber

'SR_INT' is the type of those integers small enough to fit into 29 bits.

Therefor the value range of this small integers is: $-2^{28}...2^{28}-1$.

Small integers are represented by an immediate integer handle, containing the value instead of pointing to it, which has the following form:

+-------+-------+-------+-------+- - - -+-------+-------+-------+
| guard | sign  | bit   | bit   |       | bit   | tag   | tag   |
| bit   | bit   | 27    | 26    |       | 0     | 0     | 1     |
+-------+-------+-------+-------+- - - -+-------+-------+-------+

Immediate integers handles carry the tag 'SR_INT', i.e. the last bit is 1. This distuingishes immediate integers from other handles which point to structures aligned on 4 byte boundaries and therefor have last bit zero. (The second bit is reserved as tag to allow extensions of this scheme.) Using immediates as pointers and dereferencing them gives address errors.

To aid overflow check the most significant two bits must always be equal, that is to say that the sign bit of immediate integers has a guard bit.

The macros 'INT_TO_SR' and 'SR_TO_INT' should be used to convert between a small integer value and its representation as immediate integer handle.

Large integers and rationals are represented by z and n where n may be undefined (if s==3) NULL represents only deleted values

Definition at line 46 of file longrat.h.

Data Fields
int debug
mpz_t n
BOOLEAN s parameter s in number: 0 (or FALSE): not normalised rational 1 (or TRUE): normalised rational 3 : integer with n==NULL
mpz_t z

Macro Definition Documentation

◆ INT_TO_SR

#define INT_TO_SR (   INT)    ((number) (((long)INT << 2) + SR_INT))

Definition at line 66 of file longrat.h.

◆ MP_SMALL

#define MP_SMALL   1

Definition at line 69 of file longrat.h.

◆ SR_HDL

#define SR_HDL (   A)    ((long)(A))

Definition at line 63 of file longrat.h.

◆ SR_INT

#define SR_INT   1L

Definition at line 65 of file longrat.h.

◆ SR_TO_INT

#define SR_TO_INT (   SR)    (((long)SR) >> 2)

Definition at line 67 of file longrat.h.

Function Documentation

◆ nlChineseRemainderSym()

number nlChineseRemainderSym ( number *  x,
number *  q,
int  rl,
BOOLEAN  sym,
CFArray inv_cache,
const coeffs  CF 
)

Definition at line 2935 of file longrat.cc.

2941 {
2942  setCharacteristic( 0 ); // only in char 0
2943  Off(SW_RATIONAL);
2944  CFArray X(rl), Q(rl);
2945  int i;
2946  for(i=rl-1;i>=0;i--)
2947  {
2948  X[i]=CF->convSingNFactoryN(x[i],FALSE,CF); // may be larger MAX_INT
2949  Q[i]=CF->convSingNFactoryN(q[i],FALSE,CF); // may be larger MAX_INT
2950  }
2951  CanonicalForm xnew,qnew;
2952  if (n_SwitchChinRem)
2953  chineseRemainder(X,Q,xnew,qnew);
2954  else
2955  chineseRemainderCached(X,Q,xnew,qnew,inv_cache);
2956  number n=CF->convFactoryNSingN(xnew,CF);
2957  if (sym)
2958  {
2959  number p=CF->convFactoryNSingN(qnew,CF);
2960  number p2;
2961  if (getCoeffType(CF) == n_Q) p2=nlIntDiv(p,nlInit(2, CF),CF);
2962  else p2=CF->cfDiv(p,CF->cfInit(2, CF),CF);
2963  if (CF->cfGreater(n,p2,CF))
2964  {
2965  number n2=CF->cfSub(n,p,CF);
2966  CF->cfDelete(&n,CF);
2967  n=n2;
2968  }
2969  CF->cfDelete(&p2,CF);
2970  CF->cfDelete(&p,CF);

◆ nlDelete()

void nlDelete ( number *  a,
const coeffs  r 
)

Definition at line 2494 of file longrat.cc.

2499 {
2500  if (*a!=NULL)
2501  {
2502  nlTest(*a, r);
2503  if ((SR_HDL(*a) & SR_INT)==0)
2504  {
2505  _nlDelete_NoImm(a);

◆ nlGetDenom()

number nlGetDenom ( number &  n,
const coeffs  r 
)

Definition at line 1497 of file longrat.cc.

1500 {
1501  if (!(SR_HDL(n) & SR_INT))
1502  {
1503  if (n->s==0)
1504  {
1505  nlNormalize(n,r);
1506  }
1507  if (!(SR_HDL(n) & SR_INT))
1508  {
1509  if (n->s!=3)
1510  {
1511  number u=ALLOC_RNUMBER();
1512  u->s=3;
1513 #if defined(LDEBUG)
1514  u->debug=123456;
1515 #endif
1516  mpz_init_set(u->z,n->n);
1517  u=nlShort3_noinline(u);
1518  return u;
1519  }
1520  }
1521  }

◆ nlGetNumerator()

number nlGetNumerator ( number &  n,
const coeffs  r 
)

Definition at line 1526 of file longrat.cc.

1529 {
1530  if (!(SR_HDL(n) & SR_INT))
1531  {
1532  if (n->s==0)
1533  {
1534  nlNormalize(n,r);
1535  }
1536  if (!(SR_HDL(n) & SR_INT))
1537  {
1538  number u=ALLOC_RNUMBER();
1539 #if defined(LDEBUG)
1540  u->debug=123456;
1541 #endif
1542  u->s=3;
1543  mpz_init_set(u->z,n->z);
1544  if (n->s!=3)
1545  {
1546  u=nlShort3_noinline(u);
1547  }
1548  return u;
1549  }
1550  }

◆ nlGMP()

void nlGMP ( number &  i,
mpz_t  n,
const coeffs  r 
)

Definition at line 1476 of file longrat.cc.

1479 {
1480  // Hier brauche ich einfach die GMP Zahl
1481  nlTest(i, r);
1482  nlNormalize(i, r);
1483  if (SR_HDL(i) & SR_INT)
1484  {
1485  mpz_set_si(n, SR_TO_INT(i));
1486  return;
1487  }
1488  if (i->s!=3)
1489  {
1490  WarnS("Omitted denominator during coefficient mapping !");
1491  }

◆ nlInit2()

number nlInit2 ( int  i,
int  j,
const coeffs  r 
)

create a rational i/j (implicitly) over Q NOTE: make sure to use correct Q in debug mode

Definition at line 2373 of file longrat.cc.

2377 {
2378  number z=ALLOC_RNUMBER();
2379 #if defined(LDEBUG)
2380  z->debug=123456;
2381 #endif
2382  mpz_init_set_si(z->z,(long)i);
2383  mpz_init_set_si(z->n,(long)j);
2384  z->s = 0;

◆ nlInit2gmp()

number nlInit2gmp ( mpz_t  i,
mpz_t  j,
const coeffs  r 
)

create a rational i/j (implicitly) over Q NOTE: make sure to use correct Q in debug mode

Definition at line 2386 of file longrat.cc.

2390 {
2391  number z=ALLOC_RNUMBER();
2392 #if defined(LDEBUG)
2393  z->debug=123456;
2394 #endif
2395  mpz_init_set(z->z,i);
2396  mpz_init_set(z->n,j);
2397  z->s = 0;

◆ nlInitChar()

BOOLEAN nlInitChar ( coeffs  ,
void *   
)

Definition at line 3322 of file longrat.cc.

3327 {
3328  r->is_domain=TRUE;
3329  r->rep=n_rep_gap_rat;
3330 
3331  r->nCoeffIsEqual=nlCoeffIsEqual;
3332  //r->cfKillChar = ndKillChar; /* dummy */
3333  r->cfCoeffString=nlCoeffString;
3334  r->cfCoeffName=nlCoeffName;
3335 
3336  r->cfInitMPZ = nlInitMPZ;
3337  r->cfMPZ = nlMPZ;
3338 
3339  r->cfMult = nlMult;
3340  r->cfSub = nlSub;
3341  r->cfAdd = nlAdd;
3342  r->cfExactDiv= nlExactDiv;
3343  if (p==NULL) /* Q */
3344  {
3345  r->is_field=TRUE;
3346  r->cfDiv = nlDiv;
3347  //r->cfGcd = ndGcd_dummy;
3348  r->cfSubringGcd = nlGcd;
3349  }
3350  else /* Z: coeffs_BIGINT */
3351  {
3352  r->is_field=FALSE;
3353  r->cfDiv = nlIntDiv;
3354  r->cfIntMod= nlIntMod;
3355  r->cfGcd = nlGcd;
3356  r->cfDivBy=nlDivBy;
3357  r->cfDivComp = nlDivComp;
3358  r->cfIsUnit = nlIsUnit;
3359  r->cfGetUnit = nlGetUnit;
3360  r->cfQuot1 = nlQuot1;
3361  r->cfLcm = nlLcm;
3362  r->cfXExtGcd=nlXExtGcd;
3363  r->cfQuotRem=nlQuotRem;
3364  }
3365  r->cfInit = nlInit;
3366  r->cfSize = nlSize;
3367  r->cfInt = nlInt;
3368 
3369  r->cfChineseRemainder=nlChineseRemainderSym;
3370  r->cfFarey=nlFarey;
3371  r->cfInpNeg = nlNeg;
3372  r->cfInvers= nlInvers;
3373  r->cfCopy = nlCopy;
3374  r->cfRePart = nlCopy;
3375  //r->cfImPart = ndReturn0;
3376  r->cfWriteLong = nlWrite;
3377  r->cfRead = nlRead;
3378  r->cfNormalize=nlNormalize;
3379  r->cfGreater = nlGreater;
3380  r->cfEqual = nlEqual;
3381  r->cfIsZero = nlIsZero;
3382  r->cfIsOne = nlIsOne;
3383  r->cfIsMOne = nlIsMOne;
3384  r->cfGreaterZero = nlGreaterZero;
3385  r->cfPower = nlPower;
3386  r->cfGetDenom = nlGetDenom;
3387  r->cfGetNumerator = nlGetNumerator;
3388  r->cfExtGcd = nlExtGcd; // only for ring stuff and Z
3389  r->cfNormalizeHelper = nlNormalizeHelper;
3390  r->cfDelete= nlDelete;
3391  r->cfSetMap = nlSetMap;
3392  //r->cfName = ndName;
3393  r->cfInpMult=nlInpMult;
3394  r->cfInpAdd=nlInpAdd;
3395  r->cfCoeffWrite=nlCoeffWrite;
3396 
3397  r->cfClearContent = nlClearContent;
3398  r->cfClearDenominators = nlClearDenominators;
3399 
3400 #ifdef LDEBUG
3401  // debug stuff
3402  r->cfDBTest=nlDBTest;
3403 #endif
3404  r->convSingNFactoryN=nlConvSingNFactoryN;
3405  r->convFactoryNSingN=nlConvFactoryNSingN;
3406 
3407  r->cfRandom=nlRandom;
3408 
3409  // io via ssi
3410  r->cfWriteFd=nlWriteFd;
3411  r->cfReadFd=nlReadFd;
3412 
3413  //r->type = n_Q;
3414  r->ch = 0;
3415  r->has_simple_Alloc=FALSE;
3416  r->has_simple_Inverse=FALSE;
3417 

◆ nlInpGcd()

void nlInpGcd ( number &  a,
number  b,
const coeffs  r 
)

Definition at line 2773 of file longrat.cc.

2778 {
2779  if ((SR_HDL(b)|SR_HDL(a))&SR_INT)
2780  {
2781  number n=nlGcd(a,b,r);
2782  nlDelete(&a,r);
2783  a=n;
2784  }
2785  else
2786  {

◆ nlIsInteger()

static FORCE_INLINE BOOLEAN nlIsInteger ( number  q,
const coeffs  r 
)
static

Definition at line 92 of file longrat.h.

94 {
95  assume( nCoeff_is_Q (r) );
96  n_Test(q, r);
97 
98  if (SR_HDL(q) & SR_INT)
99  return TRUE; // immediate int
100 
101  return ( q->s == 3 );

◆ nlMapGMP()

number nlMapGMP ( number  from,
const coeffs  src,
const coeffs  dst 
)

Definition at line 199 of file longrat.cc.

202 {
203  number z=ALLOC_RNUMBER();
204 #if defined(LDEBUG)
205  z->debug=123456;
206 #endif
207  mpz_init_set(z->z,(mpz_ptr) from);
208  z->s = 3;
209  z=nlShort3(z);

◆ nlModP()

number nlModP ( number  q,
const coeffs  Q,
const coeffs  Zp 
)

Definition at line 1434 of file longrat.cc.

1437 {
1438  const int p = n_GetChar(Zp);
1439  assume( p > 0 );
1440 
1441  const long P = p;
1442  assume( P > 0 );
1443 
1444  // embedded long within q => only long numerator has to be converted
1445  // to int (modulo char.)
1446  if (SR_HDL(q) & SR_INT)
1447  {
1448  long i = SR_TO_INT(q);
1449  return n_Init( i, Zp );
1450  }
1451 
1452  const unsigned long PP = p;
1453 
1454  // numerator modulo char. should fit into int
1455  number z = n_Init( static_cast<long>(mpz_fdiv_ui(q->z, PP)), Zp );
1456 
1457  // denominator != 1?
1458  if (q->s!=3)
1459  {
1460  // denominator modulo char. should fit into int
1461  number n = n_Init( static_cast<long>(mpz_fdiv_ui(q->n, PP)), Zp );
1462 
1463  number res = n_Div( z, n, Zp );
1464 
1465  n_Delete(&z, Zp);
1466  n_Delete(&n, Zp);
1467 
1468  return res;
1469  }
1470 

◆ nlNormalize()

void nlNormalize ( number &  x,
const coeffs  r 
)

Definition at line 1343 of file longrat.cc.

1346 {
1347  if ((SR_HDL(x) & SR_INT) ||(x==NULL))
1348  return;
1349  if (x->s==3)
1350  {
1352  nlTest(x,r);
1353  return;
1354  }
1355  else if (x->s==0)
1356  {
1357  if (mpz_cmp_si(x->n,1L)==0)
1358  {
1359  mpz_clear(x->n);
1360  x->s=3;
1361  x=nlShort3(x);
1362  }
1363  else
1364  {
1365  mpz_t gcd;
1366  mpz_init(gcd);
1367  mpz_gcd(gcd,x->z,x->n);
1368  x->s=1;
1369  if (mpz_cmp_si(gcd,1L)!=0)
1370  {
1371  mpz_divexact(x->z,x->z,gcd);
1372  mpz_divexact(x->n,x->n,gcd);
1373  if (mpz_cmp_si(x->n,1L)==0)
1374  {
1375  mpz_clear(x->n);
1376  x->s=3;
1378  }
1379  }
1380  mpz_clear(gcd);
1381  }
1382  }

◆ nlQlogSize()

static FORCE_INLINE int nlQlogSize ( number  n,
const coeffs  r 
)
static

only used by slimgb (tgb.cc)

Definition at line 74 of file longrat.h.

76 {
77  assume( nCoeff_is_Q (r) );
78 
79  if(SR_HDL(n)&SR_INT)
80  {
81  if (SR_HDL(n)==SR_INT) return 0;
82  long i = SR_TO_INT (n);
83  unsigned long v;
84  v = ABS(i);
85  return SI_LOG2(v) + 1;
86  }
87  //assume denominator is 0
88  number nn=(number) n;
89  return mpz_sizeinbase (nn->z, 2);
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:420
nlLcm
static number nlLcm(number a, number b, const coeffs r)
Definition: longrat.cc:3298
n_rep_gap_rat
(number), see longrat.h
Definition: coeffs.h:110
FALSE
#define FALSE
Definition: auxiliary.h:94
nlIsUnit
BOOLEAN nlIsUnit(number a, const coeffs)
Definition: longrat.cc:992
nlIsZero
LINLINE BOOLEAN nlIsZero(number za, const coeffs r)
Definition: longrat.cc:2461
SW_RATIONAL
static const int SW_RATIONAL
set to 1 for computations over Q
Definition: cf_defs.h:28
ALLOC_RNUMBER
#define ALLOC_RNUMBER()
Definition: coeffs.h:86
nlQuot1
coeffs nlQuot1(number c, const coeffs r)
Definition: longrat.cc:967
j
int j
Definition: facHensel.cc:105
nlInpMult
LINLINE void nlInpMult(number &a, number b, const coeffs r)
Definition: longrat.cc:2613
x
Variable x
Definition: cfModGcd.cc:4023
nlSetMap
nMapFunc nlSetMap(const coeffs src, const coeffs dst)
Definition: longrat.cc:2322
nlInt
long nlInt(number &n, const coeffs r)
Definition: longrat.cc:597
nlExtGcd
number nlExtGcd(number a, number b, number *s, number *t, const coeffs)
Definition: longrat.cc:2877
SR_HDL
#define SR_HDL(A)
Definition: longrat.h:63
n_GetChar
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition: coeffs.h:443
nlIsOne
LINLINE BOOLEAN nlIsOne(number a, const coeffs r)
Definition: longrat.cc:2452
nlChineseRemainderSym
number nlChineseRemainderSym(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs CF)
Definition: longrat.cc:2935
nlCopy
LINLINE number nlCopy(number a, const coeffs r)
Definition: longrat.cc:2481
nlIsMOne
BOOLEAN nlIsMOne(number a, const coeffs r)
Definition: longrat.cc:1189
nlCoeffName
char * nlCoeffName(const coeffs r)
Definition: longrat.cc:3164
nlCoeffWrite
void nlCoeffWrite(const coeffs r, BOOLEAN details)
Definition: longrat.cc:2926
SI_LOG2
static int SI_LOG2(int v)
Definition: auxiliary.h:119
_nlDelete_NoImm
void _nlDelete_NoImm(number *a)
Definition: longrat.cc:1624
nlDivComp
int nlDivComp(number a, number b, const coeffs r)
Definition: longrat.cc:950
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:454
n_Q
rational (GMP) numbers
Definition: coeffs.h:30
nlDivBy
BOOLEAN nlDivBy(number a, number b, const coeffs)
Definition: longrat.cc:936
nlInpAdd
LINLINE void nlInpAdd(number &a, number b, const coeffs r)
Definition: longrat.cc:2547
ABS
static int ABS(int v)
Definition: auxiliary.h:110
nlInit
LINLINE number nlInit(long i, const coeffs r)
Definition: longrat.cc:2434
b
CanonicalForm b
Definition: cfModGcd.cc:4044
nlSub
LINLINE number nlSub(number la, number li, const coeffs r)
Definition: longrat.cc:2595
CanonicalForm
factory's main class
Definition: canonicalform.h:77
nlDBTest
BOOLEAN nlDBTest(number a, const char *f, const int l)
nlTest
#define nlTest(a, r)
Definition: longrat.cc:92
nlSize
int nlSize(number a, const coeffs)
Definition: longrat.cc:568
nCoeff_is_Q
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition: coeffs.h:827
nlEqual
LINLINE BOOLEAN nlEqual(number a, number b, const coeffs r)
Definition: longrat.cc:2425
nlRandom
static number nlRandom(siRandProc p, number v2, number, const coeffs cf)
Definition: longrat.cc:3308
nlPower
void nlPower(number x, int exp, number *lu, const coeffs r)
Definition: longrat.cc:1111
nlClearContent
static void nlClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf)
Definition: longrat.cc:2979
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
Array< CanonicalForm >
res
CanonicalForm res
Definition: facAbsFact.cc:64
nlWriteFd
void nlWriteFd(number n, const ssiInfo *d, const coeffs)
Definition: longrat.cc:3177
nlClearDenominators
static void nlClearDenominators(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf)
Definition: longrat.cc:3070
nlWrite
void nlWrite(number a, const coeffs r)
Definition: longrat0.cc:90
nlXExtGcd
number nlXExtGcd(number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
Definition: longrat.cc:2668
nlGetUnit
number nlGetUnit(number n, const coeffs cf)
Definition: longrat.cc:961
nlNormalizeHelper
number nlNormalizeHelper(number a, number b, const coeffs r)
Definition: longrat.cc:1387
nlConvFactoryNSingN
static number nlConvFactoryNSingN(const CanonicalForm f, const coeffs r)
Definition: longrat.cc:368
setCharacteristic
void setCharacteristic(int c)
Definition: cf_char.cc:23
nlMPZ
static void nlMPZ(mpz_t m, number &n, const coeffs r)
Definition: longrat.cc:2647
nlGcd
number nlGcd(number a, number b, const coeffs r)
Definition: longrat.cc:1201
nlConvSingNFactoryN
static CanonicalForm nlConvSingNFactoryN(number n, const BOOLEAN setChar, const coeffs)
Definition: longrat.cc:330
nlInitMPZ
static number nlInitMPZ(mpz_t m, const coeffs)
Definition: longrat.cc:2656
nlNormalize
void nlNormalize(number &x, const coeffs r)
Definition: longrat.cc:1343
chineseRemainderCached
void chineseRemainderCached(CFArray &a, CFArray &n, CanonicalForm &xnew, CanonicalForm &prod, CFArray &inv)
Definition: cf_chinese.cc:265
nlGetNumerator
number nlGetNumerator(number &n, const coeffs r)
Definition: longrat.cc:1526
chineseRemainder
void chineseRemainder(const CanonicalForm &x1, const CanonicalForm &q1, const CanonicalForm &x2, const CanonicalForm &q2, CanonicalForm &xnew, CanonicalForm &qnew)
void chineseRemainder ( const CanonicalForm & x1, const CanonicalForm & q1, const CanonicalForm & x2,...
Definition: cf_chinese.cc:52
nlGetDenom
number nlGetDenom(number &n, const coeffs r)
Definition: longrat.cc:1497
n_Init
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:537
nlQuotRem
number nlQuotRem(number a, number b, number *r, const coeffs R)
Definition: longrat.cc:2720
nlGreaterZero
BOOLEAN nlGreaterZero(number za, const coeffs r)
Definition: longrat.cc:1164
nlIntMod
number nlIntMod(number a, number b, const coeffs r)
Definition: longrat.cc:875
Off
void Off(int sw)
switches
Definition: canonicalform.cc:1905
SR_INT
#define SR_INT
Definition: longrat.h:65
SR_TO_INT
#define SR_TO_INT(SR)
Definition: longrat.h:67
nlDiv
number nlDiv(number a, number b, const coeffs r)
Definition: longrat.cc:1001
nlAdd
LINLINE number nlAdd(number la, number li, const coeffs r)
Definition: longrat.cc:2529
nlInvers
number nlInvers(number a, const coeffs r)
Definition: longrat.cc:647
nlShort3
static number nlShort3(number x)
Definition: longrat.cc:114
nlFarey
number nlFarey(number nN, number nP, const coeffs CF)
Definition: longrat.cc:2806
SR_HDL
#define SR_HDL(A)
Definition: tgb.cc:35
WarnS
#define WarnS
Definition: emacs.cc:77
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:9
nlRead
const char * nlRead(const char *s, number *a, const coeffs r)
Definition: longrat0.cc:31
nlIntDiv
number nlIntDiv(number a, number b, const coeffs r)
Definition: longrat.cc:794
gcd
int gcd(int a, int b)
Definition: walkSupport.cc:836
nlShort3_noinline
number nlShort3_noinline(number x)
Definition: longrat.cc:163
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
nlMult
LINLINE number nlMult(number a, number b, const coeffs r)
Definition: longrat.cc:2565
p
int p
Definition: cfModGcd.cc:4019
nlNeg
LINLINE number nlNeg(number za, const coeffs r)
Definition: longrat.cc:2510
n_Div
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...
Definition: coeffs.h:614
Q
#define Q
Definition: sirandom.c:25
n_Test
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
Definition: coeffs.h:737
nlDelete
LINLINE void nlDelete(number *a, const coeffs r)
Definition: longrat.cc:2494
n_SwitchChinRem
int n_SwitchChinRem
Definition: longrat.cc:2934
nlExactDiv
number nlExactDiv(number a, number b, const coeffs r)
Definition: longrat.cc:727
nlCoeffIsEqual
BOOLEAN nlCoeffIsEqual(const coeffs r, n_coeffType n, void *p)
Definition: longrat.cc:3286
nlGreater
BOOLEAN nlGreater(number a, number b, const coeffs r)
Definition: longrat.cc:1174
nlReadFd
number nlReadFd(const ssiInfo *d, const coeffs)
Definition: longrat.cc:3223
nlCoeffString
static char * nlCoeffString(const coeffs r)
Definition: longrat.cc:3170