My Project  UNKNOWN_GIT_VERSION
Macros | Typedefs | Functions | Variables
ntupel.cc File Reference
#include "misc/auxiliary.h"
#include "misc/mylimits.h"
#include "reporter/reporter.h"
#include "omalloc/omalloc.h"
#include "coeffs/numbers.h"
#include "coeffs/coeffs.h"
#include "coeffs/mpr_complex.h"
#include "coeffs/ntupel.h"
#include "coeffs/modulop.h"
#include "coeffs/longrat.h"

Go to the source code of this file.

Macros

#define SI_BUF_SIZE   1024
 

Typedefs

typedef coeffscoeffs_array
 
typedef number * number_array
 
typedef char si_char_SI_BUF_SIZE[SI_BUF_SIZE]
 

Functions

static void nnCoeffWrite (const coeffs r, BOOLEAN b)
 
static BOOLEAN nnGreaterZero (number k, const coeffs r)
 
static number nnMult (number a, number b, const coeffs r)
 
static number nnInit (long l, const coeffs r)
 
static long nnInt (number &n, const coeffs r)
 
static int nnSize (number n, const coeffs r)
 
static number nnCopy (number a, const coeffs r)
 
static number nnAdd (number a, number b, const coeffs r)
 
static number nnSub (number a, number b, const coeffs r)
 
static BOOLEAN nnIsZero (number a, const coeffs r)
 
static BOOLEAN nnIsOne (number a, const coeffs r)
 
static BOOLEAN nnIsMOne (number a, const coeffs r)
 
static number nnDiv (number a, number b, const coeffs r)
 
static number nnInvers (number a, const coeffs r)
 
static number nnInpNeg (number a, const coeffs r)
 
static BOOLEAN nnGreater (number a, number b, const coeffs r)
 
static BOOLEAN nnEqual (number a, number b, const coeffs r)
 
static void nnWriteShort (number a, const coeffs r)
 
static void nnWriteLong (number a, const coeffs r)
 
static const char * nnRead (const char *s, number *a, const coeffs r)
 
BOOLEAN nnDBTest (number a, const char *f, const int l, const coeffs r)
 
static number nnMap (number from, const coeffs aRing, const coeffs r)
 
nMapFunc nnSetMap (const coeffs src, const coeffs dst)
 
static char * nnCoeffString (const coeffs r)
 
static char * nnCoeffName (const coeffs r)
 
static void nnDelete (number *a, const coeffs r)
 
static number nnChineseRemainder (number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs CF)
 
BOOLEAN nnInitChar (coeffs n, void *p)
 Initialize r. More...
 

Variables

static si_char_SI_BUF_SIZE nnCoeffName_buf
 

Macro Definition Documentation

◆ SI_BUF_SIZE

#define SI_BUF_SIZE   1024

Typedef Documentation

◆ coeffs_array

typedef coeffs* coeffs_array

Definition at line 25 of file ntupel.cc.

◆ number_array

typedef number* number_array

Definition at line 26 of file ntupel.cc.

◆ si_char_SI_BUF_SIZE

typedef char si_char_SI_BUF_SIZE[SI_BUF_SIZE]

Definition at line 545 of file ntupel.cc.

Function Documentation

◆ nnAdd()

static number nnAdd ( number  a,
number  b,
const coeffs  r 
)
static

Definition at line 152 of file ntupel.cc.

153 {
156  coeffs_array d=(coeffs_array)r->data;
157  int i=0;
158  loop
159  {
160  i++;
161  if (d[i]==NULL) break;
162  }
163  number *C=(number*)omAlloc(i*sizeof(number));
164  i=0;
165  loop
166  {
167  C[i]=d[i]->cfAdd(A[i],B[i],d[i]);
168  i++;
169  if (d[i]==NULL) return (number)C;
170  }
171 }

◆ nnChineseRemainder()

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

Definition at line 582 of file ntupel.cc.

583 {
584  WerrorS("not yet");
585  return NULL;
586 }

◆ nnCoeffName()

static char* nnCoeffName ( const coeffs  r)
static

Definition at line 547 of file ntupel.cc.

548 {
549  coeffs_array d=(coeffs_array)r->data;
550  int i=0;
551  nnCoeffName_buf[0]='\0';
552  loop
553  {
554  char *s=d[i]->cfCoeffName(d[i]);
555  strncat(nnCoeffName_buf,s, SI_BUF_SIZE-strlen(nnCoeffName_buf)-strlen(s)-1);
556  i++;
557  if (d[i]==NULL) break;
558  strncat(nnCoeffName_buf," x ", SI_BUF_SIZE-strlen(nnCoeffName_buf)-4);
559  }
560  return nnCoeffName_buf;
561 }

◆ nnCoeffString()

static char* nnCoeffString ( const coeffs  r)
static

Definition at line 527 of file ntupel.cc.

528 {
529  #define SI_BUF_SIZE 1024
530  char buf[SI_BUF_SIZE];
531  coeffs_array d=(coeffs_array)r->data;
532  int i=0;
533  buf[0]='\0';
534  loop
535  {
536  char *s=d[i]->cfCoeffName(d[i]);
537  strncat(buf,s, SI_BUF_SIZE-strlen(buf)-strlen(s)-1);
538  i++;
539  if (d[i]==NULL) break;
540  strncat(buf," x ", SI_BUF_SIZE-strlen(buf)-4);
541  }
542  return omStrDup(buf);
543 }

◆ nnCoeffWrite()

static void nnCoeffWrite ( const coeffs  r,
BOOLEAN  b 
)
static

Definition at line 28 of file ntupel.cc.

29 {
30  int i=0;
31  coeffs_array d=(coeffs_array)r->data;
32  loop
33  {
34  d[i]->cfCoeffWrite(d[i],b);
35  i++;
36  if (d[i]==NULL) break;
37  PrintS(" x ");
38  }
39 }

◆ nnCopy()

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

Definition at line 132 of file ntupel.cc.

133 {
135  coeffs_array d=(coeffs_array)r->data;
136  int i=0;
137  loop
138  {
139  i++;
140  if (d[i]==NULL) break;
141  }
142  number *C=(number*)omAlloc(i*sizeof(number));
143  i=0;
144  loop
145  {
146  C[i]=d[i]->cfCopy(A[i],d[i]);
147  i++;
148  if (d[i]==NULL) return (number)C;
149  }
150 }

◆ nnDBTest()

BOOLEAN nnDBTest ( number  a,
const char *  f,
const int  l,
const coeffs  r 
)

Definition at line 485 of file ntupel.cc.

486 {
487  BOOLEAN bo=FALSE;
489  coeffs_array d=(coeffs_array)r->data;
490  int i=0;
491  loop
492  {
493  bo&=d[i]->cfDBTest(A[i],f,l,d[i]);
494  i++;
495  if (d[i]==NULL) return bo;
496  }
497 }

◆ nnDelete()

static void nnDelete ( number *  a,
const coeffs  r 
)
static

Definition at line 563 of file ntupel.cc.

564 {
565  if (*a!=NULL)
566  {
567  coeffs_array d=(coeffs_array)r->data;
569  int i=0;
570  loop
571  {
572  d[i]->cfDelete(&(A[i]),d[i]);
573  i++;
574  if (d[i]==NULL) break;
575  }
576  omFreeSize(d,i*sizeof(number));
577  *a=NULL;
578  }
579 }

◆ nnDiv()

static number nnDiv ( number  a,
number  b,
const coeffs  r 
)
static

Definition at line 233 of file ntupel.cc.

234 {
235  if (nnIsZero(b,r))
236  {
237  WerrorS(nDivBy0);
238  return nnInit(0,r);
239  }
242  coeffs_array d=(coeffs_array)r->data;
243  int i=0;
244  loop
245  {
246  i++;
247  if (d[i]==NULL) break;
248  }
249  number *C=(number*)omAlloc(i*sizeof(number));
250  i=0;
251  loop
252  {
253  C[i]=d[i]->cfDiv(A[i],B[i],d[i]);
254  i++;
255  if (d[i]==NULL) return (number)C;
256  }
257 }

◆ nnEqual()

static BOOLEAN nnEqual ( number  a,
number  b,
const coeffs  r 
)
static

Definition at line 321 of file ntupel.cc.

322 {
323  int i=0;
326  coeffs_array d=(coeffs_array)r->data;
327  loop
328  {
329  if (!d[i]->cfEqual(A[i],B[i],d[i])) return FALSE;
330  i++;
331  if (d[i]==NULL) return TRUE;
332  }
333 }

◆ nnGreater()

static BOOLEAN nnGreater ( number  a,
number  b,
const coeffs  r 
)
static

Definition at line 303 of file ntupel.cc.

304 {
307  coeffs_array d=(coeffs_array)r->data;
308  int i=0;
309  loop
310  {
311  if (d[i]->type==n_R) return d[i]->cfGreater(A[i],B[i],d[i]);
312  else if (d[i]->type==n_long_R) return d[i]->cfGreater(A[i],B[i],d[i]);
313  i++;
314  if (d[i]==NULL)
315  {
316  return d[i-1]->cfGreater(A[i],B[i],d[i-1]);
317  }
318  }
319 }

◆ nnGreaterZero()

static BOOLEAN nnGreaterZero ( number  k,
const coeffs  r 
)
static

Definition at line 42 of file ntupel.cc.

43 {
44  int i=0;
45  coeffs_array d=(coeffs_array)r->data;
46  loop
47  {
48  if (d[i]->type==n_R) return d[i]->cfGreaterZero(k,d[i]);
49  if (d[i]->type==n_long_R) return d[i]->cfGreaterZero(k,d[i]);
50  i++;
51  if (d[i]==NULL) return d[i-1]->cfGreaterZero(k,d[i-1]);
52  }
53 }

◆ nnInit()

static number nnInit ( long  l,
const coeffs  r 
)
static

Definition at line 79 of file ntupel.cc.

80 {
81  coeffs_array d=(coeffs_array)r->data;
82  int i=0;
83  loop
84  {
85  i++;
86  if (d[i]==NULL) break;
87  }
88  number *C=(number*)omAlloc(i*sizeof(number));
89  i=0;
90  loop
91  {
92  C[i]=d[i]->cfInit(l,d[i]);
93  i++;
94  if (d[i]==NULL) return (number)C;
95  }
96 }

◆ nnInitChar()

BOOLEAN nnInitChar ( coeffs  n,
void *  p 
)

Initialize r.

Definition at line 589 of file ntupel.cc.

590 {
591  n->data=p;
592  n->type=n_nTupel;
593  n->is_field=TRUE;
594  n->is_domain=TRUE;
595 
596  n->ch = 0;
597  n->cfCoeffString = nnCoeffString;
598  n->cfCoeffName = nnCoeffName;
599 
600  n->cfInit = nnInit;
601  n->cfDelete = nnDelete;
602  n->cfInt = nnInt;
603  n->cfAdd = nnAdd;
604  n->cfSub = nnSub;
605  n->cfMult = nnMult;
606  n->cfDiv = nnDiv;
607  n->cfExactDiv= nnDiv;
608  n->cfInpNeg = nnInpNeg;
609  n->cfInvers= nnInvers;
610  n->cfCopy = nnCopy;
611  n->cfGreater = nnGreater;
612  n->cfEqual = nnEqual;
613  n->cfIsZero = nnIsZero;
614  n->cfIsOne = nnIsOne;
615  n->cfIsMOne = nnIsMOne;
616  n->cfGreaterZero = nnGreaterZero;
617  n->cfWriteShort = nnWriteShort;
618  n->cfWriteLong = nnWriteLong;
619  n->cfRead = nnRead;
620  //n->cfPower = nnPower;
621  n->cfSetMap = nnSetMap;
622  n->cfCoeffWrite = nnCoeffWrite;
623 
624  n->cfChineseRemainder=nnChineseRemainder;
625  n->cfSize = nnSize;
626 #ifdef LDEBUG
627  n->cfDBTest=nnDBTest;
628 #endif
629  //n->nCoeffIsEqual = ndCoeffIsEqual;
630  return FALSE;
631 }

◆ nnInpNeg()

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

Definition at line 284 of file ntupel.cc.

285 {
287  coeffs_array d=(coeffs_array)r->data;
288  int i=0;
289  loop
290  {
291  i++;
292  if (d[i]==NULL) break;
293  }
294  i=0;
295  loop
296  {
297  A[i]=d[i]->cfInpNeg(A[i],d[i]);
298  i++;
299  if (d[i]==NULL) return (number)A;
300  }
301 }

◆ nnInt()

static long nnInt ( number &  n,
const coeffs  r 
)
static

Definition at line 101 of file ntupel.cc.

102 {
103  int i=0;
104  coeffs_array d=(coeffs_array)r->data;
105  loop
106  {
107  if (d[i]->type==n_R) return d[i]->cfInt(n,d[i]);
108  if (d[i]->type==n_long_R) return d[i]->cfInt(n,d[i]);
109  i++;
110  if (d[i]==NULL) return d[i-1]->cfInt(n,d[i-1]);
111  }
112 }

◆ nnInvers()

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

Definition at line 259 of file ntupel.cc.

260 {
261  if (nnIsZero(a,r))
262  {
263  WerrorS(nDivBy0);
264  return nnInit(0,r);
265  }
267  coeffs_array d=(coeffs_array)r->data;
268  int i=0;
269  loop
270  {
271  i++;
272  if (d[i]==NULL) break;
273  }
274  number *C=(number*)omAlloc(i*sizeof(number));
275  i=0;
276  loop
277  {
278  C[i]=d[i]->cfInvers(A[i],d[i]);
279  i++;
280  if (d[i]==NULL) return (number)C;
281  }
282 }

◆ nnIsMOne()

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

Definition at line 220 of file ntupel.cc.

221 {
222  int i=0;
224  coeffs_array d=(coeffs_array)r->data;
225  loop
226  {
227  if (!d[i]->cfIsMOne(A[i],d[i])) return FALSE;
228  i++;
229  if (d[i]==NULL) return TRUE;
230  }
231 }

◆ nnIsOne()

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

Definition at line 207 of file ntupel.cc.

208 {
209  int i=0;
211  coeffs_array d=(coeffs_array)r->data;
212  loop
213  {
214  if (!d[i]->cfIsOne(A[i],d[i])) return FALSE;
215  i++;
216  if (d[i]==NULL) return TRUE;
217  }
218 }

◆ nnIsZero()

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

Definition at line 194 of file ntupel.cc.

195 {
197  coeffs_array d=(coeffs_array)r->data;
198  int i=0;
199  loop
200  {
201  if (!d[i]->cfIsZero(A[i],d[i])) return FALSE;
202  i++;
203  if (d[i]==NULL) return TRUE;
204  }
205 }

◆ nnMap()

static number nnMap ( number  from,
const coeffs  aRing,
const coeffs  r 
)
static

Definition at line 500 of file ntupel.cc.

501 {
502  coeffs_array d=(coeffs_array)r->data;
503  int i=0;
504  loop
505  {
506  i++;
507  if (d[i]==NULL) break;
508  }
509  number *C=(number*)omAlloc(i*sizeof(number));
510  nMapFunc nMap;
511  i=0;
512  loop
513  {
514  nMap=d[i]->cfSetMap(aRing,d[i]);
515  if (nMap==NULL) Werror("no map for compoment %d",i);
516  else C[i]=nMap(from,aRing,d[i]);
517  i++;
518  if (d[i]==NULL) return (number)C;
519  }
520 }

◆ nnMult()

static number nnMult ( number  a,
number  b,
const coeffs  r 
)
static

Definition at line 55 of file ntupel.cc.

56 {
59  coeffs_array d=(coeffs_array)r->data;
60  int i=0;
61  loop
62  {
63  i++;
64  if (d[i]==NULL) break;
65  }
66  number *C=(number*)omAlloc(i*sizeof(number));
67  i=0;
68  loop
69  {
70  C[i]=d[i]->cfMult(A[i],B[i],d[i]);
71  i++;
72  if (d[i]==NULL) return (number)C;
73  }
74 }

◆ nnRead()

static const char* nnRead ( const char *  s,
number *  a,
const coeffs  r 
)
static

Definition at line 384 of file ntupel.cc.

385 {
386  // reading R/longR part, setting everything else to random
387  coeffs_array d=(coeffs_array)r->data;
388  int i=0;
389  loop
390  {
391  i++;
392  if (d[i]==NULL) break;
393  }
394  number *C=(number*)omAlloc0(i*sizeof(number));
395  *a=(number)C;
396  int is_zero=2; /*1: read 0, 2: read <> 0 */
397  int reader=-1;
398  i=0;
399  loop
400  {
401  if ((d[i]->type==n_R)
402  || (d[i]->type==n_long_R))
403  {
404  s=d[i]->cfRead(s,&(C[i]),d[i]);
405  is_zero=d[i]->cfIsZero(C[i],d[i]);
406  reader=i;
407  break;
408  }
409  i++;
410  if (d[i]==NULL)
411  {
412  s=d[i-1]->cfRead(s,&(C[i-1]),d[i-1]);
413  is_zero=d[i-1]->cfIsZero(C[i-1],d[i-1]);
414  reader=i-1;
415  break;
416  }
417  }
418  if (is_zero==0)
419  { // seting random values!=0 for Z/p
420  i=0;
421  loop
422  {
423  if (i!=reader)
424  {
425  if (d[i]->type==n_Zp)
426  {
427  int l=0;
428  do
429  {
430  l=siRand();
431  } while(l%(d[i]->ch)==0);
432  C[i]=d[i]->cfInit(l,d[i]);
433  }
434  else if ((d[i]->type==n_R)
435  || (d[i]->type==n_long_R))
436  {
437  nMapFunc nMap=d[i]->cfSetMap(d[reader],d[i]);
438  C[i]=nMap(C[reader],d[reader],d[i]);
439  }
440  else
441  {
442  WerrorS("reading is not suppiorted for such compinations of coeffs");
443  break;
444  }
445  }
446  i++;
447  if (d[i]==NULL) break;
448  }
449  }
450  else if (is_zero==1)
451  { // read a zero
452  i=0;
453  loop
454  {
455  C[i]=d[i]->cfInit(0,d[i]);
456  i++;
457  if (d[i]==NULL) break;
458  }
459  }
460  else if (reader==-1)/* not R or long_R*/
461  {
462  s=d[0]->cfRead(s,&(C[0]),d[0]);
463  i=1;
464  loop
465  {
466  if (d[i]==NULL) break;
467  i++;
468  {
469  nMapFunc nMap=d[i]->cfSetMap(d[0],d[i]);
470  C[i]=nMap(C[0],d[0],d[i]);
471  }
472  }
473  }
474  else
475  {
476  WerrorS("nnRead: should not happen");
477  }
478  return s;
479 }

◆ nnSetMap()

nMapFunc nnSetMap ( const coeffs  src,
const coeffs  dst 
)

Definition at line 522 of file ntupel.cc.

523 {
524  return nnMap;
525 }

◆ nnSize()

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

Definition at line 114 of file ntupel.cc.

115 {
116  int s=0;
117  int i=0;
118  coeffs_array d=(coeffs_array)r->data;
119  loop
120  {
121  if (d[i]->type==n_R) s+=d[i]->cfSize(n,d[i]);
122  else if (d[i]->type==n_long_R) s+=d[i]->cfSize(n,d[i]);
123  i++;
124  if (d[i]==NULL)
125  {
126  if (s==0) return d[i-1]->cfSize(n,d[i-1]);
127  else return s;
128  }
129  }
130 }

◆ nnSub()

static number nnSub ( number  a,
number  b,
const coeffs  r 
)
static

Definition at line 173 of file ntupel.cc.

174 {
177  coeffs_array d=(coeffs_array)r->data;
178  int i=0;
179  loop
180  {
181  i++;
182  if (d[i]==NULL) break;
183  }
184  number *C=(number*)omAlloc(i*sizeof(number));
185  i=0;
186  loop
187  {
188  C[i]=d[i]->cfSub(A[i],B[i],d[i]);
189  i++;
190  if (d[i]==NULL) return (number)C;
191  }
192 }

◆ nnWriteLong()

static void nnWriteLong ( number  a,
const coeffs  r 
)
static

Definition at line 349 of file ntupel.cc.

350 {
352  coeffs_array d=(coeffs_array)r->data;
353  int i=0;
354  StringSetS("(");
355  loop
356  {
357  d[i]->cfWriteLong(A[i],d[i]);
358  i++;
359  if (d[i]==NULL) {StringAppendS(")"); return; }
360  else StringAppendS(",");
361  }
362 }

◆ nnWriteShort()

static void nnWriteShort ( number  a,
const coeffs  r 
)
static

Definition at line 335 of file ntupel.cc.

336 {
338  coeffs_array d=(coeffs_array)r->data;
339  int i=0;
340  loop
341  {
342  if (d[i]->type==n_R) { d[i]->cfWriteLong(A[i],d[i]); return; }
343  else if (d[i]->type==n_long_R) {d[i]->cfWriteLong(A[i],d[i]); return; }
344  i++;
345  if (d[i]==NULL) { d[i-1]->cfWriteLong(A[i-1],d[i-1]); return; }
346  }
347 }

Variable Documentation

◆ nnCoeffName_buf

si_char_SI_BUF_SIZE nnCoeffName_buf
static

Definition at line 546 of file ntupel.cc.

SI_BUF_SIZE
#define SI_BUF_SIZE
FALSE
#define FALSE
Definition: auxiliary.h:94
StringAppendS
void StringAppendS(const char *st)
Definition: reporter.cc:107
f
FILE * f
Definition: checklibs.c:9
nnRead
static const char * nnRead(const char *s, number *a, const coeffs r)
Definition: ntupel.cc:384
k
int k
Definition: cfEzgcd.cc:92
nnWriteLong
static void nnWriteLong(number a, const coeffs r)
Definition: ntupel.cc:349
nnIsZero
static BOOLEAN nnIsZero(number a, const coeffs r)
Definition: ntupel.cc:194
number_array
number * number_array
Definition: ntupel.cc:26
nnCoeffString
static char * nnCoeffString(const coeffs r)
Definition: ntupel.cc:527
omStrDup
#define omStrDup(s)
Definition: omAllocDecl.h:263
nnSize
static int nnSize(number n, const coeffs r)
Definition: ntupel.cc:114
n_nTupel
@ n_nTupel
n-tupel of cf: ZZ/p1,...
Definition: coeffs.h:43
nnDiv
static number nnDiv(number a, number b, const coeffs r)
Definition: ntupel.cc:233
loop
#define loop
Definition: structs.h:78
b
CanonicalForm b
Definition: cfModGcd.cc:4044
nnMult
static number nnMult(number a, number b, const coeffs r)
Definition: ntupel.cc:55
nnWriteShort
static void nnWriteShort(number a, const coeffs r)
Definition: ntupel.cc:335
n_long_R
@ n_long_R
real floating point (GMP) numbers
Definition: coeffs.h:34
nnGreaterZero
static BOOLEAN nnGreaterZero(number k, const coeffs r)
Definition: ntupel.cc:42
nnIsOne
static BOOLEAN nnIsOne(number a, const coeffs r)
Definition: ntupel.cc:207
nnMap
static number nnMap(number from, const coeffs aRing, const coeffs r)
Definition: ntupel.cc:500
nnInpNeg
static number nnInpNeg(number a, const coeffs r)
Definition: ntupel.cc:284
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
nMapFunc
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition: coeffs.h:73
buf
int status int void * buf
Definition: si_signals.h:59
nnDelete
static void nnDelete(number *a, const coeffs r)
Definition: ntupel.cc:563
nDivBy0
const char *const nDivBy0
Definition: numbers.h:89
PrintS
void PrintS(const char *s)
Definition: reporter.cc:284
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
coeffs
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:210
nnInit
static number nnInit(long l, const coeffs r)
Definition: ntupel.cc:79
n_R
@ n_R
single prescision (6,6) real numbers
Definition: coeffs.h:32
nnIsMOne
static BOOLEAN nnIsMOne(number a, const coeffs r)
Definition: ntupel.cc:220
nnSub
static number nnSub(number a, number b, const coeffs r)
Definition: ntupel.cc:173
nnInvers
static number nnInvers(number a, const coeffs r)
Definition: ntupel.cc:259
nnGreater
static BOOLEAN nnGreater(number a, number b, const coeffs r)
Definition: ntupel.cc:303
nnInt
static long nnInt(number &n, const coeffs r)
Definition: ntupel.cc:101
nnAdd
static number nnAdd(number a, number b, const coeffs r)
Definition: ntupel.cc:152
coeffs_array
coeffs * coeffs_array
Definition: ntupel.cc:25
n_Zp
@ n_Zp
\F{p < 2^31}
Definition: coeffs.h:30
StringSetS
void StringSetS(const char *st)
Definition: reporter.cc:128
B
b *CanonicalForm B
Definition: facBivar.cc:52
nnCoeffWrite
static void nnCoeffWrite(const coeffs r, BOOLEAN b)
Definition: ntupel.cc:28
Werror
void Werror(const char *fmt,...)
Definition: reporter.cc:189
nnChineseRemainder
static number nnChineseRemainder(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs CF)
Definition: ntupel.cc:582
WerrorS
void WerrorS(const char *s)
Definition: feFopen.cc:24
NULL
#define NULL
Definition: omList.c:10
l
int l
Definition: cfEzgcd.cc:93
nnEqual
static BOOLEAN nnEqual(number a, number b, const coeffs r)
Definition: ntupel.cc:321
p
int p
Definition: cfModGcd.cc:4019
nnSetMap
nMapFunc nnSetMap(const coeffs src, const coeffs dst)
Definition: ntupel.cc:522
s
const CanonicalForm int s
Definition: facAbsFact.cc:55
siRand
int siRand()
Definition: sirandom.c:41
nnCoeffName_buf
static si_char_SI_BUF_SIZE nnCoeffName_buf
Definition: ntupel.cc:546
A
#define A
Definition: sirandom.c:23
omAlloc0
#define omAlloc0(size)
Definition: omAllocDecl.h:211
if
if(yy_init)
Definition: libparse.cc:1418
nnCopy
static number nnCopy(number a, const coeffs r)
Definition: ntupel.cc:132
nnCoeffName
static char * nnCoeffName(const coeffs r)
Definition: ntupel.cc:547
nnDBTest
BOOLEAN nnDBTest(number a, const char *f, const int l, const coeffs r)
Definition: ntupel.cc:485