number2.cc
Go to the documentation of this file.
1 #include "kernel/mod2.h" // general settings/macros
2 #include "reporter/reporter.h" // for Print, WerrorS
3 #include "coeffs/numbers.h" // nRegister, coeffs.h
4 #include "coeffs/rmodulon.h" // ZnmInfo
5 #include "coeffs/bigintmat.h" // bigintmat
6 #include "coeffs/longrat.h" // BIGINTs: nlGMP
7 #include "polys/ext_fields/algext.h" // AlgExtInfo
8 #include "misc/prime.h" // IsPrime
9 #include "Singular/blackbox.h" // blackbox type
10 #include "Singular/ipshell.h" // IsPrime
11 #include "Singular/ipconv.h" // iiConvert etc.
12 
13 #include "Singular/ipid.h" // for SModulFunctions, leftv
14 
15 #include "Singular/number2.h"
16 
17 char *crString(coeffs c)
18 {
19  if (c==NULL)
20  {
21  return omStrDup("oo");
22  }
23  return omStrDup(nCoeffName(c));
24 }
25 void crPrint(coeffs c)
26 {
27  char *s=crString(c);
28  PrintS(s);
29  omFree(s);
30 }
31 
32 // -----------------------------------------------------------
33 // interpreter stuff for cring/coeffs
34 // -----------------------------------------------------------
36 {
37  coeffs c1=(coeffs)a->Data();
38  int i2=(int)(long)b->Data();
39  if (c1->type==n_Z)
40  {
41  if (i2==IsPrime(i2))
42  {
43  res->data=(void *)nInitChar(n_Zp,(void*)(long)i2);
44  }
45  else
46  {
47  ZnmInfo info;
48  mpz_t modBase;
49  mpz_init_set_ui(modBase,i2);
50  info.base= modBase;
51  info.exp= 1;
52  if (mpz_popcount((mpz_ptr)modBase)==1) // is a power of 2
53  {
54  i2=SI_LOG2(i2);
55  // is exponent <=2^(8*sizeof(unsigned long))
56  if (i2<(8*sizeof(unsigned long)))
57  {
58  mpz_clear(modBase);
59  res->data=(void *) nInitChar(n_Z2m,(void*)(long)i2);
60  return FALSE;
61  }
62  else
63  {
64  mpz_set_ui(modBase,2);
65  info.exp=i2;
66  res->data=(void *) nInitChar(n_Znm,&info);
67  mpz_clear(modBase);
68  return FALSE;
69  }
70  }
71  res->data=(void *)nInitChar(n_Zn,&info);
72  mpz_clear(modBase);
73  }
74  return FALSE;
75  }
76  return TRUE;
77 }
79 {
80  coeffs c1=(coeffs)a->Data();
81  number i2=(number)b->Data();
82  if (c1->type==n_Z)
83  {
84  ZnmInfo info;
85  mpz_t modBase;
86  mpz_init(modBase);
87  nlGMP(i2,modBase,coeffs_BIGINT); // FIXME? TODO? // extern void nlGMP(number &i, mpz_t n, const coeffs r); // to be replaced with n_MPZ(modBase,i2,coeffs_BIGINT); // ?
88  info.base= (mpz_ptr)modBase;
89  info.exp= 1;
90  if (mpz_popcount(modBase)==1) // is a power of 2
91  {
92  // is exponent <=2^(8*sizeof(unsigned long))
93  mp_bitcnt_t l=mpz_scan1 (modBase,0);
94  if ((l>0) && (l<=8*sizeof(unsigned long)))
95  {
96  res->data=(void *) nInitChar(n_Z2m,(void*)(long)l);
97  }
98  else
99  {
100  mpz_set_ui(modBase,2);
101  info.exp= l;
102  res->data=(void *) nInitChar(n_Znm,&info);
103  }
104  mpz_clear(modBase);
105  return FALSE;
106  }
107  res->data=(void *)nInitChar(n_Zn,&info);
108  mpz_clear(modBase);
109  return FALSE;
110  }
111  return TRUE;
112 }
113 
115 {
116  coeffs a2=(coeffs)a->Data();
117  coeffs b2=(coeffs)b->Data();
118  res->data=(void*)(long)(a2==b2);
119  return FALSE;
120 }
121 
122 BOOLEAN jjR2_CR(leftv res, leftv a) // ring ->cring
123 {
124  ring r=(ring)a->Data();
125  AlgExtInfo extParam;
126  extParam.r = r;
127  coeffs cf=nInitChar(n_transExt,&extParam);
128  res->data=(void*)cf;
129  return FALSE;
130 }
131 
132 #ifdef SINGULAR_4_2
133 // -----------------------------------------------------------
134 // interpreter stuff for Number/number2
135 // -----------------------------------------------------------
136 BOOLEAN jjNUMBER2_POW(leftv res, leftv a, leftv b)
137 {
138  number2 a2=(number2)a->Data();
139  if (a2->cf==NULL) return TRUE;
140  number2 r=(number2)omAlloc0(sizeof(*r));
141  r->cf=a2->cf;
142  n_Power(a2->n,(int)(long)b->Data(),&(r->n),r->cf);
143  return FALSE;
144 }
145 BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b)
146 {
147  int op=iiOp;
148  // binary operations for number2
149  number2 a2=NULL;
150  number aa=NULL;
151  number2 b2=NULL;
152  number bb=NULL;
155  int ai,bi;
156  int at=a->Typ();
157  int bt=b->Typ();
158  if ((ai=iiTestConvert(at,CNUMBER_CMD,dConvertTypes))!=0)
159  {
160  if ((bi=iiTestConvert(bt,CNUMBER_CMD,dConvertTypes))!=0)
161  {
162  iiConvert(at,CNUMBER_CMD,ai,a,an);
163  iiConvert(bt,CNUMBER_CMD,bi,b,bn);
164  a2=(number2)an->Data();
165  b2=(number2)bn->Data();
166  if (((a2!=NULL) && (b2!=NULL) && (a2->cf!=b2->cf))
167  || (a2==NULL)
168  || (b2==NULL))
169  {
170  an->CleanUp();
171  bn->CleanUp();
174  WerrorS("Number not compatible");
175  return TRUE;
176  }
177  aa=a2->n;
178  bb=b2->n;
179  number2 r=(number2)omAlloc0(sizeof(*r));
180  r->cf=a2->cf;
181  if (r->cf==NULL) op=0; // force error
182  switch(op)
183  {
184  case '+': r->n=n_Add(aa,bb,r->cf);break;
185  case '-': r->n=n_Sub(aa,bb,r->cf);break;
186  case '*': r->n=n_Mult(aa,bb,r->cf);break;
187  case '/': r->n=n_Div(aa,bb,r->cf);break;
188  case '%': r->n=n_IntMod(aa,bb,r->cf);break;
189  default: Werror("unknown binary operation %s(%d)",Tok2Cmdname(op),op);
190  omFree(r);
191  an->CleanUp();
192  bn->CleanUp();
195  return TRUE;
196  }
197  res->data=(void*)r;
198  r->cf->ref++;
199  return FALSE;
200  }
201  else
202  {
203  an->CleanUp();
205  Werror("cannot convert second operand (%s) to Number",b->Name());
206  return TRUE;
207  }
208  }
209  else
210  {
211  Werror("cannot convert first operand (%s) to Number",a->Name());
212  return TRUE;
213  }
214 }
215 BOOLEAN jjNUMBER2_OP1(leftv res, leftv a)
216 {
217  int op=iiOp;
218  // unary operations for number2
219  number2 a2=(number2)a->Data();
220  number2 r=(number2)omAlloc(sizeof(*r));
221  r->cf=a2->cf;
222  if (a2->cf==NULL) op=0; // force error
223  switch(op)
224  {
225  case '-': r->n=n_Copy(a2->n,a2->cf);r->n=n_InpNeg(r->n,a2->cf);break;
226  default: Werror("unknown unary operation %s(%d)",Tok2Cmdname(op),op);
227  omFree(r);
228  return TRUE;
229  }
230  res->data=(void*)r;
231  r->cf->ref++;
232  return FALSE;
233 }
234 
235 BOOLEAN jjPOLY2_POW(leftv res, leftv a, leftv b)
236 {
237  poly2 a2=(poly2)a->Data();
238  if (a2->cf==NULL) return TRUE;
239  poly2 r=(poly2)omAlloc0(sizeof(*r));
240  r->cf=a2->cf;
241  r->n=p_Power(p_Copy(a2->n,r->cf),(int)(long)b->Data(),r->cf);
242  return FALSE;
243 }
244 BOOLEAN jjPOLY2_OP2(leftv res, leftv a, leftv b)
245 {
246  int op=iiOp;
247  // binary operations for poly2
248  poly2 a2=NULL;
249  poly aa=NULL;
250  poly2 b2=NULL;
251  poly bb=NULL;
254  int ai,bi;
255  int at=a->Typ();
256  int bt=b->Typ();
257  if ((ai=iiTestConvert(at,CPOLY_CMD,dConvertTypes))!=0)
258  {
259  if ((bi=iiTestConvert(bt,CPOLY_CMD,dConvertTypes))!=0)
260  {
261  iiConvert(at,CPOLY_CMD,ai,a,an);
262  iiConvert(bt,CPOLY_CMD,bi,b,bn);
263  a2=(poly2)an->Data();
264  b2=(poly2)bn->Data();
265  if (((a2!=NULL) && (b2!=NULL) && (a2->cf!=b2->cf))
266  || (a2==NULL)
267  || (b2==NULL))
268  {
269  an->CleanUp();
270  bn->CleanUp();
273  WerrorS("Poly not compatible");
274  return TRUE;
275  }
276  aa=a2->n;
277  bb=b2->n;
278  poly2 r=(poly2)omAlloc0(sizeof(*r));
279  r->cf=a2->cf;
280  if (r->cf==NULL) op=0; // force error
281  switch(op)
282  {
283  case '+': r->n=p_Add_q(p_Copy(aa,r->cf),p_Copy(bb,r->cf),r->cf);break;
284  case '-': r->n=p_Sub(p_Copy(aa,r->cf),p_Copy(bb,r->cf),r->cf);break;
285  case '*': r->n=pp_Mult_qq(aa,bb,r->cf);break;
286  //case '/': r->n=n_Div(aa,bb,r->cf);break;
287  //case '%': r->n=n_IntMod(aa,bb,r->cf);break;
288  default: Werror("unknown binary operation %s(%d)",Tok2Cmdname(op),op);
289  omFree(r);
290  an->CleanUp();
291  bn->CleanUp();
294  return TRUE;
295  }
296  res->data=(void*)r;
297  r->cf->ref++;
298  return FALSE;
299  }
300  else
301  {
302  an->CleanUp();
304  Werror("cannot convert second operand (%s) to Poly",b->Name());
305  return TRUE;
306  }
307  }
308  else
309  {
310  Werror("cannot convert first operand (%s) to Poly",a->Name());
311  return TRUE;
312  }
313 }
314 BOOLEAN jjPOLY2_OP1(leftv res, leftv a)
315 {
316  int op=iiOp;
317  // unary operations for poly2
318  poly2 a2=(poly2)a->Data();
319  poly2 r=(poly2)omAlloc(sizeof(*r));
320  r->cf=a2->cf;
321  if (a2->cf==NULL) op=0; // force error
322  switch(op)
323  {
324  case '-': r->n=p_Copy(a2->n,a2->cf);r->n=p_Neg(r->n,a2->cf);break;
325  default: Werror("unknown unary operation %s(%d)",Tok2Cmdname(op),op);
326  omFree(r);
327  return TRUE;
328  }
329  res->data=(void*)r;
330  r->cf->ref++;
331  return FALSE;
332 }
333 
334 BOOLEAN jjNUMBER2CR(leftv res, leftv a, leftv b)
335 {
336  number2 r=(number2)omAlloc(sizeof(*r));
337  r->cf=(coeffs)b->CopyD();
338  BOOLEAN bo=FALSE;
339  switch(a->Typ())
340  {
341  case INT_CMD:
342  r->n=n_Init((long)a->Data(),r->cf); break;
343  case BIGINT_CMD:
344  {
345  nMapFunc nMap=n_SetMap(coeffs_BIGINT,r->cf);
346  r->n=nMap((number)a->Data(),coeffs_BIGINT,r->cf); break;
347  }
348  case NUMBER_CMD:
349  {
350  nMapFunc nMap=n_SetMap(currRing->cf,r->cf);
351  if (nMap!=NULL)
352  r->n=nMap((number)a->Data(),currRing->cf,r->cf);
353  else
354  bo=TRUE;
355  break;
356  }
357  case CNUMBER_CMD:
358  {
359  number2 a2=(number2)a->Data();
360  if (a2->cf==NULL) bo=TRUE;
361  else
362  {
363  nMapFunc nMap=n_SetMap(a2->cf,r->cf);
364  if (nMap!=NULL)
365  r->n=nMap(a2->n,a2->cf,r->cf);
366  else
367  bo=TRUE;
368  }
369  break;
370  }
371  default: bo=TRUE; break;
372  }
373  if (bo)
374  {
375  Werror("no conversion to Number from %s",Tok2Cmdname(a->Typ()));
376  omFreeSize(r,sizeof(*r));
377  }
378  else
379  res->data=(void*)r;
380  return bo;
381 }
382 
383 BOOLEAN jjN2_CR(leftv res, leftv a) // number2 ->cring
384 {
385  number2 n=(number2)a->Data();
386  n->cf->ref++;
387  res->data=(void*)n->cf;
388  return FALSE;
389 }
390 
391 BOOLEAN jjP2_R(leftv res, leftv a) // poly2 ->ring
392 {
393  poly2 n=(poly2)a->Data();
394  n->cf->ref++;
395  res->data=(void*)n->cf;
396  return FALSE;
397 }
398 
399 BOOLEAN jjCM_CR(leftv res, leftv a) // cmatrix ->cring
400 {
401  bigintmat *b=(bigintmat*)a->Data();
402  coeffs cf=b->basecoeffs();
403  if (cf!=NULL)
404  {
405  cf->ref++;
406  }
407  res->data=(void*)cf;
408  return FALSE;
409 }
410 
411 BOOLEAN jjCMATRIX_3(leftv res, leftv r, leftv c,leftv cf)
412 {
413  bigintmat *b=new bigintmat((int)(long)r->Data(),
414  (int)(long)c->Data(),
415  (coeffs)cf->Data());
416  res->data=(char*)b;
417  return FALSE;
418 }
419 
420 BOOLEAN jjN2_N(leftv res, leftv a) // number2 ->number
421 {
422  number2 n2=(number2)a->Data();
423  BOOLEAN bo=TRUE;
424  if (currRing!=NULL)
425  {
426  nMapFunc nMap=n_SetMap(n2->cf,currRing->cf);
427  if (nMap!=NULL)
428  {
429  res->data=(void*)nMap(n2->n,n2->cf,currRing->cf);
430  bo=FALSE;
431  }
432  }
433  return bo;
434 }
435 
436 // -----------------------------------------------------------
437 // operations with Number/number2
438 // -----------------------------------------------------------
439 number2 n2Copy(const number2 d)
440 {
441  number2 r=NULL;
442  if ((d!=NULL)&&(d->cf!=NULL))
443  {
444  r=(number2)omAlloc(sizeof(*r));
445  d->cf->ref++;
446  r->cf=d->cf;
447  if (d->cf!=NULL)
448  r->n=n_Copy(d->n,d->cf);
449  else
450  r->n=NULL;
451  }
452  return r;
453 }
454 void n2Delete(number2 &d)
455 {
456  if (d!=NULL)
457  {
458  if (d->cf!=NULL)
459  {
460  n_Delete(&d->n,d->cf);
461  nKillChar(d->cf);
462  }
463  omFreeSize(d,sizeof(*d));
464  d=NULL;
465  }
466 }
467 char *n2String(number2 d, BOOLEAN typed)
468 {
469  StringSetS("");
470  if ((d!=NULL) && (d->cf!=NULL))
471  {
472  if (typed) StringAppendS("Number(");
473  n_Write(d->n,d->cf);
474  if (typed) StringAppendS(")");
475  }
476  else StringAppendS("oo");
477  return StringEndS();
478 }
479 
480 void n2Print(number2 d)
481 {
482  char *s=n2String(d,FALSE);
483  PrintS(s);
484  omFree(s);
485 }
486 
487 // -----------------------------------------------------------
488 // operations with Poly/poly2
489 // -----------------------------------------------------------
490 
491 poly2 p2Copy(const poly2 d)
492 {
493  poly2 r=NULL;
494  if ((d!=NULL)&&(d->cf!=NULL))
495  {
496  r=(poly2)omAlloc(sizeof(*r));
497  d->cf->ref++;
498  r->cf=d->cf;
499  if (d->cf!=NULL)
500  r->n=p_Copy(d->n,d->cf);
501  else
502  r->n=NULL;
503  }
504  return r;
505 }
506 void p2Delete(poly2 &d)
507 {
508  if (d!=NULL)
509  {
510  if (d->cf!=NULL)
511  {
512  p_Delete(&d->n,d->cf);
513  rKill(d->cf);
514  }
515  omFreeSize(d,sizeof(*d));
516  d=NULL;
517  }
518 }
519 char *p2String(poly2 d, BOOLEAN typed)
520 {
521  StringSetS("");
522  if ((d!=NULL) && (d->cf!=NULL))
523  {
524  if (typed) StringAppendS("Poly(");
525  p_Write0(d->n,d->cf);
526  if (typed) StringAppendS(")");
527  }
528  else StringAppendS("oo");
529  return StringEndS();
530 }
531 
532 void p2Print(poly2 d)
533 {
534  char *s=p2String(d,FALSE);
535  PrintS(s);
536  omFree(s);
537 }
538 
539 // ---------------------------------------------------------------------
540 BOOLEAN jjBIM2_CR(leftv res, leftv a) // bigintmat ->cring
541 {
542  bigintmat *b=(bigintmat*)a->Data();
543  coeffs cf=b->basecoeffs();
544  if (cf==NULL) return TRUE;
545  cf->ref++;
546  res->data=(void*)cf;
547  return FALSE;
548 }
549 
550 #endif
mpz_ptr base
Definition: rmodulon.h:18
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of &#39;a&#39; and &#39;b&#39;, i.e., a-b
Definition: coeffs.h:670
static FORCE_INLINE number n_IntMod(number a, number b, const coeffs r)
for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,b,r) >=0
Definition: coeffs.h:629
const CanonicalForm int s
Definition: facAbsFact.cc:55
int iiTestConvert(int inputType, int outputType)
Definition: gentable.cc:299
Class used for (list of) interpreter objects.
Definition: subexpr.h:82
Definition: tok.h:48
only used if HAVE_RINGS is defined
Definition: coeffs.h:45
Definition: tok.h:96
ring r
Definition: algext.h:37
BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b)
Definition: number2.cc:78
only used if HAVE_RINGS is defined
Definition: coeffs.h:47
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
Definition: coeffs.h:39
const struct sConvertTypes dConvertTypes[]
Definition: table.h:1207
#define FALSE
Definition: auxiliary.h:94
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
Definition: ipconv.cc:401
Definition: tok.h:38
Matrices of numbers.
Definition: bigintmat.h:51
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:539
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
{p < 2^31}
Definition: coeffs.h:30
#define TRUE
Definition: auxiliary.h:98
BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b)
Definition: number2.cc:114
void * ADDRESS
Definition: auxiliary.h:133
sleftv * leftv
Definition: structs.h:60
void WerrorS(const char *s)
Definition: feFopen.cc:24
char * StringEndS()
Definition: reporter.cc:151
coeffs coeffs_BIGINT
Definition: ipid.cc:52
int Typ()
Definition: subexpr.cc:992
#define omAlloc(size)
Definition: omAllocDecl.h:210
poly p_Sub(poly p1, poly p2, const ring r)
Definition: p_polys.cc:1937
const char * Name()
Definition: subexpr.h:120
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:812
char * crString(coeffs c)
Definition: number2.cc:17
void * data
Definition: subexpr.h:88
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of &#39;a&#39; and &#39;b&#39;, i.e., a*b
Definition: coeffs.h:637
CanonicalForm b
Definition: cfModGcd.cc:4044
CanonicalForm res
Definition: facAbsFact.cc:64
void rKill(ring r)
Definition: ipshell.cc:6076
only used if HAVE_RINGS is defined
Definition: coeffs.h:46
#define omFree(addr)
Definition: omAllocDecl.h:261
The main handler for Singular numbers which are suitable for Singular polynomials.
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of &#39;a&#39; and &#39;b&#39;, i.e., a+b
Definition: coeffs.h:657
void StringSetS(const char *st)
Definition: reporter.cc:128
static poly pp_Mult_qq(poly p, poly q, const ring r)
Definition: p_polys.h:1093
void StringAppendS(const char *st)
Definition: reporter.cc:107
const ExtensionInfo & info
< [in] sqrfree poly
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition: coeffs.h:74
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition: coeffs.h:592
static FORCE_INLINE char * nCoeffName(const coeffs cf)
Definition: coeffs.h:977
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition: coeffs.h:558
only used if HAVE_RINGS is defined
Definition: coeffs.h:44
unsigned long exp
Definition: rmodulon.h:18
omBin sleftv_bin
Definition: subexpr.cc:46
void PrintS(const char *s)
Definition: reporter.cc:284
int IsPrime(int p)
Definition: prime.cc:61
void nlGMP(number &i, mpz_t n, const coeffs r)
Definition: longrat.cc:1478
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition: coeffs.h:722
BOOLEAN jjR2_CR(leftv res, leftv a)
Definition: number2.cc:122
void p_Write0(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:194
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:857
#define omAlloc0Bin(bin)
Definition: omAllocDecl.h:206
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
Definition: coeffs.h:633
CanonicalForm cf
Definition: cfModGcd.cc:4024
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of &#39;n&#39;
Definition: coeffs.h:452
struct for passing initialization parameters to naInitChar
Definition: algext.h:37
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:138
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of &#39;a&#39; and &#39;b&#39;, i.e., a/b; raises an error if &#39;b&#39; is not invertible in r exceptio...
Definition: coeffs.h:616
coeffs basecoeffs() const
Definition: bigintmat.h:147
BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b)
Definition: number2.cc:35
void CleanUp(ring r=currRing)
Definition: subexpr.cc:328
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
void * Data()
Definition: subexpr.cc:1134
static poly p_Neg(poly p, const ring r)
Definition: p_polys.h:1043
static int SI_LOG2(int v)
Definition: auxiliary.h:119
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:456
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:892
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
int iiOp
Definition: iparith.cc:218
int BOOLEAN
Definition: auxiliary.h:85
void nKillChar(coeffs r)
undo all initialisations
Definition: numbers.cc:510
poly p_Power(poly p, int i, const ring r)
Definition: p_polys.cc:2144
void Werror(const char *fmt,...)
Definition: reporter.cc:189
void * CopyD(int t)
Definition: subexpr.cc:703
#define omAlloc0(size)
Definition: omAllocDecl.h:211
int l
Definition: cfEzgcd.cc:93
void crPrint(coeffs c)
Definition: number2.cc:25
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition: numbers.cc:349
#define omStrDup(s)
Definition: omAllocDecl.h:263