My Project  UNKNOWN_GIT_VERSION
Data Structures | Functions | Variables
numbers.cc File Reference
#include <string.h>
#include <stdlib.h>
#include "misc/auxiliary.h"
#include "misc/mylimits.h"
#include "omalloc/omalloc.h"
#include "factory/factory.h"
#include "reporter/reporter.h"
#include "coeffs/coeffs.h"
#include "coeffs/numbers.h"
#include "coeffs/longrat.h"
#include "coeffs/modulop.h"
#include "coeffs/gnumpfl.h"
#include "coeffs/gnumpc.h"
#include "coeffs/ffields.h"
#include "coeffs/shortfl.h"
#include "coeffs/ntupel.h"
#include "coeffs/rmodulo2m.h"
#include "coeffs/rmodulon.h"
#include "coeffs/rintegers.h"
#include "polys/ext_fields/algext.h"
#include "polys/ext_fields/transext.h"

Go to the source code of this file.

Data Structures

struct  nFindCoeffByName_p
 

Functions

void nNew (number *d)
 
static void ndDelete (number *d, const coeffs)
 
static number ndAnn (number, const coeffs)
 
static char * ndCoeffString (const coeffs r)
 
static char * ndCoeffName (const coeffs r)
 
static void ndInpMult (number &a, number b, const coeffs r)
 
static void ndInpAdd (number &a, number b, const coeffs r)
 
static void ndPower (number a, int i, number *res, const coeffs r)
 
static number ndInvers (number a, const coeffs r)
 
static BOOLEAN ndIsUnit (number a, const coeffs r)
 
static BOOLEAN ndDBTest (number, const char *, const int, const coeffs)
 
static number ndFarey (number, number, const coeffs r)
 
static number ndChineseRemainder (number *, number *, int, BOOLEAN, CFArray &, const coeffs r)
 
static int ndParDeg (number n, const coeffs r)
 
static number ndParameter (const int, const coeffs r)
 
BOOLEAN n_IsZeroDivisor (number a, const coeffs r)
 Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementation: should ONLY be used for debug stuff /tests. More...
 
static void ndNormalize (number &, const coeffs)
 
static number ndReturn0 (number, const coeffs r)
 
number ndGcd (number, number, const coeffs r)
 
static number ndIntMod (number, number, const coeffs r)
 
static number ndGetDenom (number &, const coeffs r)
 
static number ndGetNumerator (number &a, const coeffs r)
 
static int ndSize (number a, const coeffs r)
 
static void ndClearContent (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
 
static void ndClearDenominators (ICoeffsEnumerator &, number &d, const coeffs r)
 
static number ndCopy (number a, const coeffs)
 
number ndCopyMap (number a, const coeffs aRing, const coeffs r)
 
static void ndKillChar (coeffs)
 
static void ndSetChar (const coeffs)
 
number nd_Copy (number a, const coeffs r)
 
static BOOLEAN ndDivBy (number, number, const coeffs)
 
static int ndDivComp (number, number, const coeffs)
 
static number ndExtGcd (number, number, number *, number *, const coeffs r)
 
CanonicalForm ndConvSingNFactoryN (number, BOOLEAN, const coeffs)
 
static number ndConvFactoryNSingN (const CanonicalForm, const coeffs)
 [in, out] a bigint number >= 0
More...
 
static void ndMPZ (mpz_t result, number &n, const coeffs r)
 Converts a non-negative bigint number into a GMP number. More...
 
static number ndInitMPZ (mpz_t m, const coeffs r)
 
static BOOLEAN ndCoeffIsEqual (const coeffs r, n_coeffType n, void *)
 
static number ndQuotRem (number a, number b, number *r, const coeffs R)
 
coeffs nInitChar (n_coeffType t, void *parameter)
 one-time initialisations for new coeffs in case of an error return NULL More...
 
void nKillChar (coeffs r)
 undo all initialisations More...
 
n_coeffType nRegister (n_coeffType n, cfInitCharProc p)
 
void nRegisterCfByName (cfInitCfByNameProc p, n_coeffType n)
 
coeffs nFindCoeffByName (char *cf_name)
 find an existing coeff by its "CoeffName" More...
 
void n_Print (number &a, const coeffs r)
 print a number (BEWARE of string buffers!) mostly for debugging More...
 
number n_convFactoryNSingN (const CanonicalForm n, const coeffs r)
 
CanonicalForm n_convSingNFactoryN (number n, BOOLEAN setChar, const coeffs r)
 
char * nEati (char *s, int *i, int m)
 divide by the first (leading) number and return it, i.e. make monic More...
 
char * nEatLong (char *s, mpz_ptr i)
 extracts a long integer from s, returns the rest More...
 

Variables

n_Procs_scf_root =NULL
 
static n_coeffType nLastCoeffs =n_CF
 
cfInitCharProc nInitCharTableDefault []
 
static cfInitCharProcnInitCharTable =nInitCharTableDefault
 
nFindCoeffByName_p nFindCoeffByName_Root =NULL
 

Data Structure Documentation

◆ nFindCoeffByName_s

struct nFindCoeffByName_s

Definition at line 572 of file numbers.cc.

Data Fields
n_coeffType n
nFindCoeffByName_p next
cfInitCfByNameProc p

Function Documentation

◆ n_convFactoryNSingN()

number n_convFactoryNSingN ( const CanonicalForm  n,
const coeffs  r 
)

Definition at line 622 of file numbers.cc.

624 { STATISTIC(n_convFactoryNSingN); assume(r != NULL); assume(r->convFactoryNSingN != NULL); return r->convFactoryNSingN(n, r); }

◆ n_convSingNFactoryN()

CanonicalForm n_convSingNFactoryN ( number  n,
BOOLEAN  setChar,
const coeffs  r 
)

Definition at line 627 of file numbers.cc.

629 { STATISTIC(n_convSingNFactoryN); assume(r != NULL); assume(r->convSingNFactoryN != NULL); return r->convSingNFactoryN(n, setChar, r); }

◆ n_IsZeroDivisor()

BOOLEAN n_IsZeroDivisor ( number  a,
const coeffs  r 
)

Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementation: should ONLY be used for debug stuff /tests.

Definition at line 146 of file numbers.cc.

147 {
148  BOOLEAN ret = n_IsZero(a, r);
149  int c = n_GetChar(r);
150  if (ret || (c==0) || (r->is_field))
151  return ret; /*n_IsZero(a, r)*/
152  number ch = n_Init( c, r );
153  number g = n_Gcd( ch, a, r );
154  ret = !n_IsOne (g, r);
155  n_Delete(&ch, r);
156  n_Delete(&g, r);
157  return ret;
158 }

◆ n_Print()

void n_Print ( number &  a,
const coeffs  r 
)

print a number (BEWARE of string buffers!) mostly for debugging

Definition at line 611 of file numbers.cc.

613 {
614  assume(r != NULL);
615  n_Test(a,r);
616 
617  StringSetS("");
618  n_Write(a, r);
619  { char* s = StringEndS(); Print("%s", s); omFree(s); }

◆ nd_Copy()

number nd_Copy ( number  a,
const coeffs  r 
)

Definition at line 265 of file numbers.cc.

265 { return r->cfCopy(a, r); }

◆ ndAnn()

static number ndAnn ( number  ,
const  coeffs 
)
static

Definition at line 55 of file numbers.cc.

55 { return NULL;}

◆ ndChineseRemainder()

static number ndChineseRemainder ( number *  ,
number *  ,
int  ,
BOOLEAN  ,
CFArray ,
const coeffs  r 
)
static

Definition at line 129 of file numbers.cc.

130 {
131  Werror("ChineseRemainder not implemented for %s (c=%d)",r->cfCoeffString(r),getCoeffType(r));
132  return r->cfInit(0,r);
133 }

◆ ndClearContent()

static void ndClearContent ( ICoeffsEnumerator numberCollectionEnumerator,
number &  c,
const coeffs  r 
)
static

TODO: move to a separate implementation

Definition at line 168 of file numbers.cc.

169 {
170  assume(r != NULL);
171 
172  // no fractions
173  assume(!( nCoeff_is_Q(r) ));
174  // all coeffs are given by integers!!!
175 
176  numberCollectionEnumerator.Reset();
177 
178  if( !numberCollectionEnumerator.MoveNext() ) // empty zero polynomial?
179  {
180  c = n_Init(1, r);
181  return;
182  }
183 
184  number &curr = numberCollectionEnumerator.Current();
185 
186 #ifdef HAVE_RINGS
187  /// TODO: move to a separate implementation
188  if (nCoeff_is_Ring(r))
189  {
190  if (nCoeff_has_Units(r))
191  {
192  c = n_GetUnit(curr, r);
193 
194  if (!n_IsOne(c, r))
195  {
196  number inv = n_Invers(c, r);
197 
198  n_InpMult(curr, inv, r);
199 
200  while( numberCollectionEnumerator.MoveNext() )
201  {
202  number &n = numberCollectionEnumerator.Current();
203  n_Normalize(n, r); // ?
204  n_InpMult(n, inv, r); // TODO: either this or directly divide!!!?
205  }
206 
207  n_Delete(&inv, r);
208  }
209  } else c = n_Init(1, r);
210 
211  return;
212  }
213 #endif
214 
215  assume(!nCoeff_is_Ring(r));
217 
218  n_Normalize(curr, r); // Q: good/bad/ugly??
219 
220  if (!n_IsOne(curr, r))
221  {
222  number t = curr; // takes over the curr! note: not a reference!!!
223 
224  curr = n_Init(1, r); // ???
225 
226  number inv = n_Invers(t, r);
227 
228  while( numberCollectionEnumerator.MoveNext() )
229  {
230  number &n = numberCollectionEnumerator.Current();
231  n_InpMult(n, inv, r); // TODO: either this or directly divide!!!?
232 // n_Normalize(n, r); // ?
233  }
234 
235  n_Delete(&inv, r);
236 
237  c = t;
238  } else
239  c = n_Copy(curr, r); // c == 1 and nothing else to do...
240 }

◆ ndClearDenominators()

static void ndClearDenominators ( ICoeffsEnumerator ,
number &  d,
const coeffs  r 
)
static

Definition at line 242 of file numbers.cc.

243 {
244  assume( r != NULL );
247 
248  d = n_Init(1, r);
249 }

◆ ndCoeffIsEqual()

static BOOLEAN ndCoeffIsEqual ( const coeffs  r,
n_coeffType  n,
void *   
)
static

Definition at line 299 of file numbers.cc.

301 {
302  /* test, if r is an instance of nInitCoeffs(n,parameter) */
303  /* if parameter is not needed */
304  return (n==r->type);

◆ ndCoeffName()

static char* ndCoeffName ( const coeffs  r)
static

Definition at line 61 of file numbers.cc.

62 {
63  static char s[20];
64  snprintf(s,11,"Coeffs(%d)",r->type);
65  return s;
66 }

◆ ndCoeffString()

static char* ndCoeffString ( const coeffs  r)
static

Definition at line 56 of file numbers.cc.

57 {
58  char *s=(char *)omAlloc(11);snprintf(s,11,"Coeffs(%d)",r->type);
59  return s;
60 }

◆ ndConvFactoryNSingN()

static number ndConvFactoryNSingN ( const  CanonicalForm,
const  coeffs 
)
static

[in, out] a bigint number >= 0

[out] the GMP equivalent

Definition at line 280 of file numbers.cc.

◆ ndConvSingNFactoryN()

CanonicalForm ndConvSingNFactoryN ( number  ,
BOOLEAN  ,
const  coeffs 
)

Definition at line 273 of file numbers.cc.

274 {
275  CanonicalForm term(0);
276  WerrorS("no conversion to factory");
277  return term;
278 }

◆ ndCopy()

static number ndCopy ( number  a,
const  coeffs 
)
static

Definition at line 251 of file numbers.cc.

251 { return a; }

◆ ndCopyMap()

number ndCopyMap ( number  a,
const coeffs  aRing,
const coeffs  r 
)

Definition at line 252 of file numbers.cc.

253 {
254  // aRing and r need not be the same, but must be the same representation
255  assume(aRing->rep==r->rep);
257  return a;
258  else
259  return r->cfCopy(a, r);
260 }

◆ ndDBTest()

static BOOLEAN ndDBTest ( number  ,
const char *  ,
const int  ,
const  coeffs 
)
static

Definition at line 121 of file numbers.cc.

121 { return TRUE; }

◆ ndDelete()

static void ndDelete ( number *  d,
const  coeffs 
)
static

Definition at line 54 of file numbers.cc.

54 { *d=NULL; }

◆ ndDivBy()

static BOOLEAN ndDivBy ( number  ,
number  ,
const  coeffs 
)
static

Definition at line 268 of file numbers.cc.

268 { return TRUE; } // assume a,b !=0

◆ ndDivComp()

static int ndDivComp ( number  ,
number  ,
const  coeffs 
)
static

Definition at line 269 of file numbers.cc.

269 { return 2; }

◆ ndExtGcd()

static number ndExtGcd ( number  ,
number  ,
number *  ,
number *  ,
const coeffs  r 
)
static

Definition at line 270 of file numbers.cc.

270 { return r->cfInit(1,r); }

◆ ndFarey()

static number ndFarey ( number  ,
number  ,
const coeffs  r 
)
static

Definition at line 124 of file numbers.cc.

125 {
126  Werror("farey not implemented for %s (c=%d)",r->cfCoeffString(r),getCoeffType(r));
127  return NULL;
128 }

◆ ndGcd()

number ndGcd ( number  ,
number  ,
const coeffs  r 
)

Definition at line 162 of file numbers.cc.

162 { return r->cfInit(1,r); }

◆ ndGetDenom()

static number ndGetDenom ( number &  ,
const coeffs  r 
)
static

Definition at line 164 of file numbers.cc.

164 { return r->cfInit(1,r); }

◆ ndGetNumerator()

static number ndGetNumerator ( number &  a,
const coeffs  r 
)
static

Definition at line 165 of file numbers.cc.

165 { return r->cfCopy(a,r); }

◆ ndInitMPZ()

static number ndInitMPZ ( mpz_t  m,
const coeffs  r 
)
static

Definition at line 293 of file numbers.cc.

295 {
296  return r->cfInit( mpz_get_si(m), r);

◆ ndInpAdd()

static void ndInpAdd ( number &  a,
number  b,
const coeffs  r 
)
static

Definition at line 73 of file numbers.cc.

74 {
75  number n=r->cfAdd(a,b,r);
76  r->cfDelete(&a,r);
77  a=n;
78 }

◆ ndInpMult()

static void ndInpMult ( number &  a,
number  b,
const coeffs  r 
)
static

Definition at line 67 of file numbers.cc.

68 {
69  number n=r->cfMult(a,b,r);
70  r->cfDelete(&a,r);
71  a=n;
72 }

◆ ndIntMod()

static number ndIntMod ( number  ,
number  ,
const coeffs  r 
)
static

Definition at line 163 of file numbers.cc.

163 { return r->cfInit(0,r); }

◆ ndInvers()

static number ndInvers ( number  a,
const coeffs  r 
)
static

Definition at line 110 of file numbers.cc.

111 {
112  number one=r->cfInit(1,r);
113  number res=r->cfDiv(one,a,r);
114  r->cfDelete(&one,r);
115  return res;
116 }

◆ ndIsUnit()

static BOOLEAN ndIsUnit ( number  a,
const coeffs  r 
)
static

Definition at line 118 of file numbers.cc.

118 { return !r->cfIsZero(a,r); }

◆ ndKillChar()

static void ndKillChar ( coeffs  )
static

Definition at line 262 of file numbers.cc.

262 {}

◆ ndMPZ()

static void ndMPZ ( mpz_t  result,
number &  n,
const coeffs  r 
)
static

Converts a non-negative bigint number into a GMP number.

Definition at line 288 of file numbers.cc.

290 {
291  mpz_init_set_si( result, r->cfInt(n, r) );

◆ ndNormalize()

static void ndNormalize ( number &  ,
const  coeffs 
)
static

Definition at line 160 of file numbers.cc.

160 { }

◆ ndParameter()

static number ndParameter ( const int  ,
const coeffs  r 
)
static

Definition at line 140 of file numbers.cc.

141 {
142  Werror("ndParameter: n_Parameter is not implemented/relevant for (coeff_type = %d)",getCoeffType(r));
143  return NULL;
144 }

◆ ndParDeg()

static int ndParDeg ( number  n,
const coeffs  r 
)
static

Definition at line 135 of file numbers.cc.

136 {
137  return (-r->cfIsZero(n,r));
138 }

◆ ndPower()

static void ndPower ( number  a,
int  i,
number *  res,
const coeffs  r 
)
static

Definition at line 80 of file numbers.cc.

81 {
82  if (i==0)
83  {
84  *res = r->cfInit(1, r);
85  }
86  else if (i==1)
87  {
88  *res = r->cfCopy(a, r);
89  }
90  else if (i==2)
91  {
92  *res = r->cfMult(a, a, r);
93  }
94  else if (i<0)
95  {
96  number b = r->cfInvers(a, r);
97  ndPower(b, -i, res, r);
98  r->cfDelete(&b, r);
99  }
100  else
101  {
102  ndPower(a, i/2, res, r);
103  r->cfInpMult(*res, *res, r);
104  if (i&1)
105  {
106  r->cfInpMult(*res, a, r);
107  }
108  }
109 }

◆ ndQuotRem()

static number ndQuotRem ( number  a,
number  b,
number *  r,
const coeffs  R 
)
static

Definition at line 306 of file numbers.cc.

308 {
309  // implementation for a field: r: 0, result: n_Div
310  assume(R->is_field);
311  *r=n_Init(0,R);
312  return n_Div(a,b,R);

◆ ndReturn0()

static number ndReturn0 ( number  ,
const coeffs  r 
)
static

Definition at line 161 of file numbers.cc.

161 { return r->cfInit(0,r); }

◆ ndSetChar()

static void ndSetChar ( const  coeffs)
static

Definition at line 263 of file numbers.cc.

263 {}

◆ ndSize()

static int ndSize ( number  a,
const coeffs  r 
)
static

Definition at line 166 of file numbers.cc.

166 { return (int)r->cfIsZero(a,r)==FALSE; }

◆ nEati()

char* nEati ( char *  s,
int *  i,
int  m 
)

divide by the first (leading) number and return it, i.e. make monic

does nothing (just returns a dummy one number) helper routine: read an int from a string (mod m), return a pointer to the rest

Definition at line 631 of file numbers.cc.

633 {
634 
635  if (((*s) >= '0') && ((*s) <= '9'))
636  {
637  unsigned long ii=0L;
638  do
639  {
640  ii *= 10;
641  ii += *s++ - '0';
642  if ((m!=0) && (ii > (MAX_INT_VAL / 10))) ii = ii % m;
643  }
644  while (((*s) >= '0') && ((*s) <= '9'));
645  if ((m!=0) && (ii>=m)) ii=ii%m;
646  *i=(int)ii;
647  }
648  else (*i) = 1;
649  return s;

◆ nEatLong()

char* nEatLong ( char *  s,
mpz_ptr  i 
)

extracts a long integer from s, returns the rest

Definition at line 652 of file numbers.cc.

654 {
655  const char * start=s;
656 
657  while (*s >= '0' && *s <= '9') s++;
658  if (*s=='\0')
659  {
660  mpz_set_str(i,start,10);
661  }
662  else
663  {
664  char c=*s;
665  *s='\0';
666  mpz_set_str(i,start,10);
667  *s=c;
668  }
669  return s;

◆ nFindCoeffByName()

coeffs nFindCoeffByName ( char *  cf_name)

find an existing coeff by its "CoeffName"

Definition at line 589 of file numbers.cc.

591 {
592  n_Procs_s* n=cf_root;
593  // try existings coeffs:
594  while(n!=NULL)
595  {
596  if ((n->cfCoeffName!=NULL)
597  && (strcmp(cf_name,n->cfCoeffName(n))==0)) return n;
598  n=n->next;
599  }
600  // TODO: parametrized cf, e.g. flint:Z/26[a]
601  // try existing types:
602  nFindCoeffByName_p p=nFindCoeffByName_Root;
603  while(p!=NULL)
604  {
605  coeffs cf=p->p(cf_name,p->n);
606  if (cf!=NULL) return cf;
607  p=p->next;
608  }
609  return NULL;

◆ nInitChar()

coeffs nInitChar ( n_coeffType  t,
void *  parameter 
)

one-time initialisations for new coeffs in case of an error return NULL

Definition at line 350 of file numbers.cc.

352 {
353  n_Procs_s *n=cf_root;
354 
355  while((n!=NULL) && (n->nCoeffIsEqual!=NULL) && (!n->nCoeffIsEqual(n,t,parameter)))
356  n=n->next;
357 
358  if (n==NULL)
359  {
360  n=(n_Procs_s*)omAlloc0(sizeof(n_Procs_s));
361  n->next=cf_root;
362  n->ref=1;
363  n->type=t;
364 
365  // default entries (different from NULL) for some routines:
367  n->cfSize = ndSize;
370  n->cfImPart=ndReturn0;
371  n->cfDelete= ndDelete;
372  n->cfAnn = ndAnn;
373  n->cfCoeffString = ndCoeffString; // should alway be changed!
374  n->cfCoeffName = ndCoeffName; // should alway be changed!
375  n->cfInpMult=ndInpMult;
376  n->cfInpAdd=ndInpAdd;
377  n->cfCopy = ndCopy;
378  n->cfIntMod=ndIntMod; /* dummy !! */
380  n->cfGcd = ndGcd;
381  n->cfNormalizeHelper = ndGcd; /* tricky, isn't it ?*/
382  n->cfLcm = ndGcd; /* tricky, isn't it ?*/
383  n->cfInitMPZ = ndInitMPZ;
384  n->cfMPZ = ndMPZ;
385  n->cfPower = ndPower;
386  n->cfQuotRem = ndQuotRem;
387  n->cfInvers = ndInvers;
388 
389  n->cfKillChar = ndKillChar; /* dummy */
390  n->cfSetChar = ndSetChar; /* dummy */
391  // temp. removed to catch all the coeffs which miss to implement this!
392 
394  n->cfFarey = ndFarey;
395  n->cfParDeg = ndParDeg;
396 
398 
401 
402  n->cfIsUnit = ndIsUnit;
403 #ifdef HAVE_RINGS
404  n->cfDivComp = ndDivComp;
405  n->cfDivBy = ndDivBy;
406  n->cfExtGcd = ndExtGcd;
407  //n->cfGetUnit = (nMapFunc)NULL;
408 #endif
409 
410 #ifdef LDEBUG
411  n->cfDBTest=ndDBTest;
412 #endif
413 
416 
417  BOOLEAN nOK=TRUE;
418  // init
419  if ((t<=nLastCoeffs) && (nInitCharTable[t]!=NULL))
420  nOK = (nInitCharTable[t])(n,parameter);
421  else
422  Werror("Sorry: the coeff type [%d] was not registered: it is missing in nInitCharTable", (int)t);
423  if (nOK)
424  {
425  omFreeSize(n,sizeof(*n));
426  return NULL;
427  }
428  cf_root=n;
429  // post init settings:
430  if (n->cfRePart==NULL) n->cfRePart=n->cfCopy;
431  if (n->cfExactDiv==NULL) n->cfExactDiv=n->cfDiv;
432  if (n->cfSubringGcd==NULL) n->cfSubringGcd=n->cfGcd;
433 
434 #ifdef HAVE_RINGS
435  if (n->cfGetUnit==NULL) n->cfGetUnit=n->cfCopy;
436 #endif
437 
438  if(n->cfWriteShort==NULL)
439  n->cfWriteShort = n->cfWriteLong;
440 
442  assume(n->cfSetChar!=NULL);
445  assume(n->cfMult!=NULL);
446  assume(n->cfSub!=NULL);
447  assume(n->cfAdd!=NULL);
448  assume(n->cfDiv!=NULL);
449  assume(n->cfIntMod!=NULL);
450  assume(n->cfExactDiv!=NULL);
451  assume(n->cfInit!=NULL);
452  assume(n->cfInitMPZ!=NULL);
453  assume(n->cfSize!=NULL);
454  assume(n->cfInt!=NULL);
455  assume(n->cfMPZ!=NULL);
456  //assume(n->n->cfDivComp!=NULL);
457  //assume(n->cfIsUnit!=NULL);
458  //assume(n->cfGetUnit!=NULL);
459  //assume(n->cfExtGcd!=NULL);
460  assume(n->cfInpNeg!=NULL);
461  assume(n->cfCopy!=NULL);
462 
463  assume(n->cfWriteLong!=NULL);
464  assume(n->cfWriteShort!=NULL);
465 
466  assume(n->iNumberOfParameters>= 0);
467 
468  assume( (n->iNumberOfParameters == 0 && n->pParameterNames == NULL) ||
469  (n->iNumberOfParameters > 0 && n->pParameterNames != NULL) );
470 
471  assume(n->cfParameter!=NULL);
472  assume(n->cfParDeg!=NULL);
473 
474  assume(n->cfRead!=NULL);
475  assume(n->cfNormalize!=NULL);
476  assume(n->cfGreater!=NULL);
477  //assume(n->cfDivBy!=NULL);
478  assume(n->cfEqual!=NULL);
479  assume(n->cfIsZero!=NULL);
480  assume(n->cfIsOne!=NULL);
481  assume(n->cfIsMOne!=NULL);
483  assume(n->cfGetDenom!=NULL);
485  assume(n->cfGcd!=NULL);
487  assume(n->cfDelete!=NULL);
488  assume(n->cfSetMap!=NULL);
489  assume(n->cfInpMult!=NULL);
490 // assume(n->cfInit_bigint!=NULL);
491  assume(n->cfCoeffWrite != NULL);
492 
493  assume(n->cfClearContent != NULL);
495 
496  assume(n->type==t);
497 
498 #ifndef SING_NDEBUG
499  if(n->cfKillChar==NULL) Warn("cfKillChar is NULL for coeff %d",t);
500  if(n->cfWriteLong==NULL) Warn("cfWrite is NULL for coeff %d",t);
501  if(n->cfWriteShort==NULL) Warn("cfWriteShort is NULL for coeff %d",t);
502  if(n->cfCoeffString==ndCoeffString) Warn("cfCoeffString is undefined for coeff %d",t);
503 #endif
504  }
505  else
506  {
507  n->ref++;
508  }
509  return n;

◆ nKillChar()

void nKillChar ( coeffs  r)

undo all initialisations

Definition at line 511 of file numbers.cc.

513 {
515  if (r!=NULL)
516  {
517  r->ref--;
518  if (r->ref<=0)
519  {
520  n_Procs_s tmp;
521  n_Procs_s* n=&tmp;
522  tmp.next=cf_root;
523  while((n->next!=NULL) && (n->next!=r)) n=n->next;
524  if (n->next==r)
525  {
526  n->next=n->next->next;
527  if (cf_root==r) cf_root=n->next;
528  assume (r->cfKillChar!=NULL); r->cfKillChar(r); // STATISTIC(nKillChar);
529  omFreeSize((void *)r, sizeof(n_Procs_s));
530  r=NULL;
531  }
532  else
533  {
534  WarnS("cf_root list destroyed");
535  }
536  }
537  }

◆ nNew()

void nNew ( number *  d)

Definition at line 51 of file numbers.cc.

51 { *d=NULL; }

◆ nRegister()

n_coeffType nRegister ( n_coeffType  n,
cfInitCharProc  p 
)

Definition at line 539 of file numbers.cc.

541 {
542  if (n==n_unknown)
543  {
546  {
548  ((int)nLastCoeffs+1)*sizeof(cfInitCharProc));
550  ((int)nLastCoeffs)*sizeof(cfInitCharProc));
551  }
552  else
553  {
555  ((int)nLastCoeffs)*sizeof(cfInitCharProc),
556  (((int)nLastCoeffs)+1)*sizeof(cfInitCharProc));
557  }
558 
560  return nLastCoeffs;
561  }
562  else
563  {
564  if (nInitCharTable[n]!=NULL) Print("coeff %d already initialized\n",n);
565  nInitCharTable[n]=p;
566  return n;
567  }

◆ nRegisterCfByName()

void nRegisterCfByName ( cfInitCfByNameProc  p,
n_coeffType  n 
)

Definition at line 580 of file numbers.cc.

582 {
583  nFindCoeffByName_p h=(nFindCoeffByName_p)omAlloc0(sizeof(*h));
584  h->p=p;
585  h->n=n;
586  h->next=nFindCoeffByName_Root;

Variable Documentation

◆ cf_root

n_Procs_s* cf_root =NULL

Definition at line 49 of file numbers.cc.

◆ nFindCoeffByName_Root

nFindCoeffByName_p nFindCoeffByName_Root =NULL

Definition at line 579 of file numbers.cc.

◆ nInitCharTable

cfInitCharProc* nInitCharTable =nInitCharTableDefault
static

Definition at line 346 of file numbers.cc.

◆ nInitCharTableDefault

cfInitCharProc nInitCharTableDefault[]

Definition at line 314 of file numbers.cc.

◆ nLastCoeffs

n_coeffType nLastCoeffs =n_CF
static

Definition at line 313 of file numbers.cc.

getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:420
n_Procs_s::cfInpMult
void(* cfInpMult)(number &a, number b, const coeffs r)
Inplace: a *= b.
Definition: coeffs.h:280
FALSE
#define FALSE
Definition: auxiliary.h:94
n_Procs_s::next
coeffs next
Definition: coeffs.h:124
n_Procs_s::convSingNFactoryN
CanonicalForm(* convSingNFactoryN)(number n, BOOLEAN setChar, const coeffs r)
Definition: coeffs.h:315
n_Procs_s::cfSize
int(* cfSize)(number n, const coeffs r)
how complicated, (0) => 0, or positive
Definition: coeffs.h:183
ndClearContent
static void ndClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
Definition: numbers.cc:168
n_Procs_s::cfGcd
number(* cfGcd)(number a, number b, const coeffs r)
Definition: coeffs.h:245
n_Procs_s::cfDivComp
int(* cfDivComp)(number a, number b, const coeffs r)
Definition: coeffs.h:376
nCoeff_is_numeric
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
Definition: coeffs.h:853
ndClearDenominators
static void ndClearDenominators(ICoeffsEnumerator &, number &d, const coeffs r)
Definition: numbers.cc:242
n_Procs_s::cfInpNeg
number(* cfInpNeg)(number a, const coeffs r)
changes argument inline: a:= -a return -a! (no copy is returned) the result should be assigned to the...
Definition: coeffs.h:194
ndDivBy
static BOOLEAN ndDivBy(number, number, const coeffs)
Definition: numbers.cc:268
ndConvFactoryNSingN
static number ndConvFactoryNSingN(const CanonicalForm, const coeffs)
[in, out] a bigint number >= 0
Definition: numbers.cc:280
nCoeff_is_Zp
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
Definition: coeffs.h:821
n_Procs_s::cfGetDenom
number(* cfGetDenom)(number &n, const coeffs r)
Definition: coeffs.h:239
n_Procs_s::iNumberOfParameters
int iNumberOfParameters
Number of Parameters in the coeffs (default 0)
Definition: coeffs.h:318
omFree
#define omFree(addr)
Definition: omAllocDecl.h:259
IAccessor::Current
virtual reference Current()=0
Gets the current element in the collection (read and write).
ndSetChar
static void ndSetChar(const coeffs)
Definition: numbers.cc:263
n_Procs_s::cfParDeg
int(* cfParDeg)(number x, const coeffs r)
degree for coeffcients: -1 for 0, 0 for "constants", ...
Definition: coeffs.h:299
n_Procs_s::cfWriteShort
void(* cfWriteShort)(number a, const coeffs r)
print a given number in a shorter way, if possible e.g. in K(a): a2 instead of a^2
Definition: coeffs.h:207
ndCoeffIsEqual
static BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void *)
Definition: numbers.cc:299
n_Procs_s::cfCoeffName
char *(* cfCoeffName)(const coeffs r)
default name of cf, should substitue cfCoeffWrite, cfCoeffString
Definition: coeffs.h:153
result
return result
Definition: facAbsBiFact.cc:76
n_InpMult
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
Definition: coeffs.h:640
n_GetChar
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition: coeffs.h:443
ndReturn0
static number ndReturn0(number, const coeffs r)
Definition: numbers.cc:161
ndIsUnit
static BOOLEAN ndIsUnit(number a, const coeffs r)
Definition: numbers.cc:118
ndCoeffString
static char * ndCoeffString(const coeffs r)
Definition: numbers.cc:56
n_Procs_s::cfCoeffWrite
void(* cfCoeffWrite)(const coeffs r, BOOLEAN details)
output of coeff description via Print
Definition: coeffs.h:147
n_Procs_s::cfIntMod
numberfunc cfIntMod
Definition: coeffs.h:174
ndParDeg
static int ndParDeg(number n, const coeffs r)
Definition: numbers.cc:135
ndParameter
static number ndParameter(const int, const coeffs r)
Definition: numbers.cc:140
ndIntMod
static number ndIntMod(number, number, const coeffs r)
Definition: numbers.cc:163
cf
CanonicalForm cf
Definition: cfModGcd.cc:4024
n_Procs_s::cfRePart
number(* cfRePart)(number a, const coeffs r)
Definition: coeffs.h:199
n_Procs_s::cfDBTest
BOOLEAN(* cfDBTest)(number a, const char *f, const int l, const coeffs r)
Test: is "a" a correct number?
Definition: coeffs.h:414
g
g
Definition: cfModGcd.cc:4031
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:454
ndQuotRem
static number ndQuotRem(number a, number b, number *r, const coeffs R)
Definition: numbers.cc:306
n_IsZero
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition: coeffs.h:463
nCoeff_is_GF
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
Definition: coeffs.h:860
StringEndS
char * StringEndS()
Definition: reporter.cc:150
n_IsOne
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition: coeffs.h:467
n_GetUnit
static FORCE_INLINE number n_GetUnit(number n, const coeffs r)
in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k i...
Definition: coeffs.h:531
n_Procs_s::type
n_coeffType type
Definition: coeffs.h:127
n_Procs_s::cfGreater
BOOLEAN(* cfGreater)(number a, number b, const coeffs r)
Definition: coeffs.h:224
b
CanonicalForm b
Definition: cfModGcd.cc:4044
n_Normalize
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
Definition: coeffs.h:577
CanonicalForm
factory's main class
Definition: canonicalform.h:77
n_Procs_s::cfInit
number(* cfInit)(long i, const coeffs r)
init with an integer
Definition: coeffs.h:177
term
Definition: int_poly.h:33
ndGetDenom
static number ndGetDenom(number &, const coeffs r)
Definition: numbers.cc:164
IBaseEnumerator::Reset
virtual void Reset()=0
Sets the enumerator to its initial position: -1, which is before the first element in the collection.
n_Procs_s::cfDelete
void(* cfDelete)(number *a, const coeffs r)
Definition: coeffs.h:271
n_coeffType
n_coeffType
Definition: coeffs.h:26
nCoeff_is_Q
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition: coeffs.h:827
n_Procs_s::cfDiv
numberfunc cfDiv
Definition: coeffs.h:174
ndInpMult
static void ndInpMult(number &a, number b, const coeffs r)
Definition: numbers.cc:67
ndDivComp
static int ndDivComp(number, number, const coeffs)
Definition: numbers.cc:269
n_convSingNFactoryN
CanonicalForm n_convSingNFactoryN(number n, BOOLEAN setChar, const coeffs r)
Definition: numbers.cc:627
n_Procs_s::cfPower
void(* cfPower)(number a, int i, number *result, const coeffs r)
Definition: coeffs.h:238
n_Procs_s::cfRead
const char *(* cfRead)(const char *s, number *a, const coeffs r)
Definition: coeffs.h:220
nInitCharTableDefault
cfInitCharProc nInitCharTableDefault[]
Definition: numbers.cc:314
n_Procs_s::cfAdd
numberfunc cfAdd
Definition: coeffs.h:174
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
ndInitMPZ
static number ndInitMPZ(mpz_t m, const coeffs r)
Definition: numbers.cc:293
res
CanonicalForm res
Definition: facAbsFact.cc:64
n_Procs_s::cfInt
long(* cfInt)(number &n, const coeffs r)
convertion to long, 0 if impossible
Definition: coeffs.h:186
n_Procs_s::ref
int ref
Definition: coeffs.h:125
n_Write
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition: coeffs.h:590
n_Procs_s::cfGetUnit
number(* cfGetUnit)(number a, const coeffs r)
Definition: coeffs.h:378
n_Procs_s::cfMPZ
void(* cfMPZ)(mpz_t result, number &n, const coeffs r)
Converts a non-negative number n into a GMP number, 0 if impossible.
Definition: coeffs.h:189
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:258
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
n_Procs_s::cfExactDiv
numberfunc cfExactDiv
Definition: coeffs.h:174
nCoeff_is_algExt
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition: coeffs.h:931
n_Procs_s::cfGetNumerator
number(* cfGetNumerator)(number &n, const coeffs r)
Definition: coeffs.h:240
n_Procs_s::cfIsZero
BOOLEAN(*)(*)(*) cfIsZero(number a, const coeffs r)
Definition: coeffs.h:227
n_Procs_s::cfClearDenominators
nCoeffsEnumeratorFunc cfClearDenominators
function pointer behind n_ClearDenominators
Definition: coeffs.h:311
nCoeff_is_Ring
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition: coeffs.h:751
ndCoeffName
static char * ndCoeffName(const coeffs r)
Definition: numbers.cc:61
h
static Poly * h
Definition: janet.cc:972
n_Procs_s::cfInpAdd
void(* cfInpAdd)(number &a, number b, const coeffs r)
Inplace: a += b.
Definition: coeffs.h:283
n_Procs_s::cfInvers
number(* cfInvers)(number a, const coeffs r)
return 1/a
Definition: coeffs.h:196
n_Procs_s::cfInitMPZ
number(* cfInitMPZ)(mpz_t i, const coeffs r)
init with a GMP integer
Definition: coeffs.h:180
n_Procs_s::cfWriteLong
void(* cfWriteLong)(number a, const coeffs r)
print a given number (long format)
Definition: coeffs.h:203
cfInitCharProc
BOOLEAN(* cfInitCharProc)(coeffs, void *)
initialize an object of type coeff, return FALSE in case of success
Definition: numbers.h:94
ndGcd
number ndGcd(number, number, const coeffs r)
Definition: numbers.cc:162
nCoeff_has_simple_Alloc
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete/n_New are empty operations.
Definition: coeffs.h:927
ndAnn
static number ndAnn(number, const coeffs)
Definition: numbers.cc:55
n_Procs_s::cfGreaterZero
BOOLEAN(*)(*)(*)(*)(*)(*) cfGreaterZero(number a, const coeffs r)
Definition: coeffs.h:236
coeffs
n_Procs_s::cfSubringGcd
number(* cfSubringGcd)(number a, number b, const coeffs r)
Definition: coeffs.h:246
n_Procs_s::cfSub
numberfunc cfSub
Definition: coeffs.h:174
n_Procs_s::cfSetMap
nMapFunc(* cfSetMap)(const coeffs src, const coeffs dst)
Definition: coeffs.h:274
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:208
n_Procs_s::cfMult
numberfunc cfMult
Definition: coeffs.h:174
n_Procs_s::cfCopy
number(* cfCopy)(number a, const coeffs r)
return a copy of a
Definition: coeffs.h:198
n_Procs_s::cfImPart
number(* cfImPart)(number a, const coeffs r)
Definition: coeffs.h:200
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
ndKillChar
static void ndKillChar(coeffs)
Definition: numbers.cc:262
cf_root
n_Procs_s * cf_root
Definition: numbers.cc:49
n_Procs_s::pParameterNames
const char ** pParameterNames
array containing the names of Parameters (default NULL)
Definition: coeffs.h:321
n_Procs_s::cfCoeffString
char *(* cfCoeffString)(const coeffs r)
string output of coeff description
Definition: coeffs.h:150
nCoeff_is_transExt
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
Definition: coeffs.h:939
n_Procs_s::cfQuotRem
number(* cfQuotRem)(number a, number b, number *rem, const coeffs r)
Definition: coeffs.h:268
n_Procs_s::cfSetChar
void(* cfSetChar)(const coeffs r)
Definition: coeffs.h:160
ndCopy
static number ndCopy(number a, const coeffs)
Definition: numbers.cc:251
ndDelete
static void ndDelete(number *d, const coeffs)
Definition: numbers.cc:54
nCoeff_has_Units
static FORCE_INLINE BOOLEAN nCoeff_has_Units(const coeffs r)
returns TRUE, if r is not a field and r has non-trivial units
Definition: coeffs.h:818
n_convFactoryNSingN
number n_convFactoryNSingN(const CanonicalForm n, const coeffs r)
Definition: numbers.cc:622
STATISTIC
#define STATISTIC(f)
Definition: numstats.h:16
n_Procs_s::cfClearContent
nCoeffsEnumeratorFunc cfClearContent
function pointer behind n_ClearContent
Definition: coeffs.h:308
n_Procs_s::cfEqual
BOOLEAN(*)(*) cfEqual(number a, number b, const coeffs r)
tests
Definition: coeffs.h:226
ndInvers
static number ndInvers(number a, const coeffs r)
Definition: numbers.cc:110
n_Procs_s::cfNormalizeHelper
number(* cfNormalizeHelper)(number a, number b, const coeffs r)
Definition: coeffs.h:270
IBaseEnumerator::MoveNext
virtual bool MoveNext()=0
Advances the enumerator to the next element of the collection. returns true if the enumerator was suc...
n_Invers
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
Definition: coeffs.h:563
StringSetS
void StringSetS(const char *st)
Definition: reporter.cc:127
ndNormalize
static void ndNormalize(number &, const coeffs)
Definition: numbers.cc:160
Print
#define Print
Definition: emacs.cc:79
n_Procs_s::cfIsOne
BOOLEAN(*)(*)(*)(*) cfIsOne(number a, const coeffs r)
Definition: coeffs.h:228
n_Procs_s::cfAnn
number(* cfAnn)(number a, const coeffs r)
Definition: coeffs.h:260
Werror
void Werror(const char *fmt,...)
Definition: reporter.cc:188
n_Procs_s::cfNormalize
void(* cfNormalize)(number &a, const coeffs r)
Definition: coeffs.h:222
n_Procs_s::cfExtGcd
number(* cfExtGcd)(number a, number b, number *s, number *t, const coeffs r)
Definition: coeffs.h:247
ndSize
static int ndSize(number a, const coeffs r)
Definition: numbers.cc:166
n_Copy
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:450
n_Gcd
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
Definition: coeffs.h:685
WerrorS
void WerrorS(const char *s)
Definition: feFopen.cc:24
n_Procs_s::cfIsUnit
BOOLEAN(* cfIsUnit)(number a, const coeffs r)
Definition: coeffs.h:377
m
int m
Definition: cfEzgcd.cc:121
WarnS
#define WarnS
Definition: emacs.cc:77
assume
#define assume(x)
Definition: mod2.h:384
nFindCoeffByName_Root
nFindCoeffByName_p nFindCoeffByName_Root
Definition: numbers.cc:579
NULL
#define NULL
Definition: omList.c:9
n_Procs_s::cfParameter
number(* cfParameter)(const int i, const coeffs r)
create i^th parameter or NULL if not possible
Definition: coeffs.h:302
nKillChar
void nKillChar(coeffs r)
undo all initialisations
Definition: numbers.cc:511
ndPower
static void ndPower(number a, int i, number *res, const coeffs r)
Definition: numbers.cc:80
n_Procs_s::cfFarey
number(* cfFarey)(number p, number n, const coeffs)
rational reconstruction: "best" rational a/b with a/b = p mod n
Definition: coeffs.h:290
ndInpAdd
static void ndInpAdd(number &a, number b, const coeffs r)
Definition: numbers.cc:73
nCoeff_is_Q_algext
static FORCE_INLINE BOOLEAN nCoeff_is_Q_algext(const coeffs r)
is it an alg. ext. of Q?
Definition: coeffs.h:935
R
#define R
Definition: sirandom.c:26
Warn
#define Warn
Definition: emacs.cc:76
p
int p
Definition: cfModGcd.cc:4019
n_Procs_s::cfLcm
number(* cfLcm)(number a, number b, const coeffs r)
Definition: coeffs.h:269
n_Procs_s::cfKillChar
void(* cfKillChar)(coeffs r)
Definition: coeffs.h:158
n_Procs_s::convFactoryNSingN
number(* convFactoryNSingN)(const CanonicalForm n, const coeffs r)
conversion to CanonicalForm(factory) to number
Definition: coeffs.h:314
s
const CanonicalForm int s
Definition: facAbsFact.cc:55
ndConvSingNFactoryN
CanonicalForm ndConvSingNFactoryN(number, BOOLEAN, const coeffs)
Definition: numbers.cc:273
nInitCharTable
static cfInitCharProc * nInitCharTable
Definition: numbers.cc:346
ndExtGcd
static number ndExtGcd(number, number, number *, number *, const coeffs r)
Definition: numbers.cc:270
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
ndFarey
static number ndFarey(number, number, const coeffs r)
Definition: numbers.cc:124
ndChineseRemainder
static number ndChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs r)
Definition: numbers.cc:129
n_Procs_s::cfDivBy
BOOLEAN(* cfDivBy)(number a, number b, const coeffs r)
Definition: coeffs.h:380
n_Test
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
Definition: coeffs.h:737
n_Procs_s::cfChineseRemainder
number(* cfChineseRemainder)(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs)
chinese remainder returns X with X mod q[i]=x[i], i=0..rl-1
Definition: coeffs.h:296
n_unknown
Definition: coeffs.h:28
n_Procs_s::nCoeffIsEqual
BOOLEAN(* nCoeffIsEqual)(const coeffs r, n_coeffType n, void *parameter)
Definition: coeffs.h:144
ndGetNumerator
static number ndGetNumerator(number &a, const coeffs r)
Definition: numbers.cc:165
omAlloc0
#define omAlloc0(size)
Definition: omAllocDecl.h:209
ndDBTest
static BOOLEAN ndDBTest(number, const char *, const int, const coeffs)
Definition: numbers.cc:121
n_Procs_s
Definition: coeffs.h:121
nLastCoeffs
static n_coeffType nLastCoeffs
Definition: numbers.cc:313
n_Procs_s::cfIsMOne
BOOLEAN(*)(*)(*)(*)(*) cfIsMOne(number a, const coeffs r)
Definition: coeffs.h:231
nCoeff_is_Zp_a
static FORCE_INLINE BOOLEAN nCoeff_is_Zp_a(const coeffs r)
Definition: coeffs.h:880
MAX_INT_VAL
const int MAX_INT_VAL
Definition: mylimits.h:11
ndMPZ
static void ndMPZ(mpz_t result, number &n, const coeffs r)
Converts a non-negative bigint number into a GMP number.
Definition: numbers.cc:288
omReallocSize
#define omReallocSize(addr, o_size, size)
Definition: omAllocDecl.h:218