My Project  debian-1:4.1.2-p1+ds-2
Data Structures | Macros | Functions | Variables
shortfl.cc File Reference
#include "misc/auxiliary.h"
#include "misc/mylimits.h"
#include "reporter/reporter.h"
#include "coeffs/numbers.h"
#include "coeffs/coeffs.h"
#include "coeffs/mpr_complex.h"
#include "coeffs/shortfl.h"
#include "coeffs/longrat.h"
#include <cmath>

Go to the source code of this file.

Data Structures

union  nf
 

Macros

#define SR_HDL(A)   ((long)(A))
 
#define IS_INT(A)   ((A)->s==3)
 
#define IS_IMM(A)   (SR_HDL(A) & SR_INT)
 
#define GET_NOM(A)   ((A)->z)
 
#define GET_DENOM(A)   ((A)->n)
 

Functions

static BOOLEAN nrDBTest (number a, const coeffs r, const char *f, const int l)
 
static nMapFunc nrSetMap (const coeffs src, const coeffs dst)
 Get a mapping function from src into the domain of this type: n_R. More...
 
static number nrMapQ (number from, const coeffs r, const coeffs aRing)
 
SI_FLOAT nrFloat (number n)
 Converts a n_R number into a float. Needed by Maps. More...
 
static void nrCoeffWrite (const coeffs r, BOOLEAN)
 
static BOOLEAN nrGreaterZero (number k, const coeffs r)
 
static number nrMult (number a, number b, const coeffs r)
 
static number nrInit (long i, const coeffs r)
 
static long nrInt (number &n, const coeffs r)
 
static number nrAdd (number a, number b, const coeffs r)
 
static number nrSub (number a, number b, const coeffs r)
 
static BOOLEAN nrIsZero (number a, const coeffs r)
 
static BOOLEAN nrIsOne (number a, const coeffs r)
 
static BOOLEAN nrIsMOne (number a, const coeffs r)
 
static number nrDiv (number a, number b, const coeffs r)
 
static number nrInvers (number c, const coeffs r)
 
static number nrNeg (number c, const coeffs r)
 
static BOOLEAN nrGreater (number a, number b, const coeffs r)
 
static BOOLEAN nrEqual (number a, number b, const coeffs r)
 
static void nrWrite (number a, const coeffs r)
 
static const char * nrRead (const char *s, number *a, const coeffs r)
 
static BOOLEAN nrDBTest (number a, const char *f, const int l, const coeffs r)
 
static number nrMapP (number from, const coeffs aRing, const coeffs r)
 
static number nrMapLongR (number from, const coeffs aRing, const coeffs r)
 
static number nrMapC (number from, const coeffs aRing, const coeffs r)
 
static number nrMapZ (number from, const coeffs aRing, const coeffs r)
 
static char * nrCoeffString (const coeffs r)
 
static char * nrCoeffName (const coeffs r)
 
BOOLEAN nrInitChar (coeffs n, void *p)
 Initialize r. More...
 

Variables

static const SI_FLOAT nrEps = 1.0e-3
 

Macro Definition Documentation

◆ GET_DENOM

#define GET_DENOM (   A)    ((A)->n)

◆ GET_NOM

#define GET_NOM (   A)    ((A)->z)

◆ IS_IMM

#define IS_IMM (   A)    (SR_HDL(A) & SR_INT)

◆ IS_INT

#define IS_INT (   A)    ((A)->s==3)

◆ SR_HDL

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

Function Documentation

◆ nrAdd()

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

Definition at line 109 of file shortfl.cc.

111 {
112  assume( getCoeffType(r) == n_R );
113 
114  SI_FLOAT x = nf(a).F();
115  SI_FLOAT y = nf(b).F();
116  SI_FLOAT f = x + y;
117  if (x > 0.0)
118  {
119  if (y < 0.0)
120  {
121  x = f / (x - y);
122  if (x < 0.0)
123  x = -x;
124  if (x < nrEps)
125  f = 0.0;
126  }
127  }
128  else
129  {
130  if (y > 0.0)
131  {
132  x = f / (y - x);
133  if (x < 0.0)
134  x = -x;
135  if (x < nrEps)
136  f = 0.0;
137  }
138  }
139  return nf(f).N();

◆ nrCoeffName()

static char* nrCoeffName ( const coeffs  r)
static

Definition at line 703 of file shortfl.cc.

705 {
706  return (char*)"Float()";

◆ nrCoeffString()

static char* nrCoeffString ( const coeffs  r)
static

Definition at line 698 of file shortfl.cc.

700 {
701  return omStrDup("Float()");

◆ nrCoeffWrite()

static void nrCoeffWrite ( const coeffs  r,
BOOLEAN   
)
static

Definition at line 61 of file shortfl.cc.

63 {
64  assume( getCoeffType(r) == n_R );
65  PrintS("Float()"); /* R */

◆ nrDBTest() [1/2]

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

Definition at line 385 of file shortfl.cc.

387 {
388  assume( getCoeffType(r) == n_R );
389 
390  return TRUE;

◆ nrDBTest() [2/2]

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

◆ nrDiv()

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

Definition at line 198 of file shortfl.cc.

200 {
201  assume( getCoeffType(r) == n_R );
202 
203  SI_FLOAT n = nf(b).F();
204  if (n == 0.0)
205  {
206  WerrorS(nDivBy0);
207  return nf((SI_FLOAT)0.0).N();
208  }
209  else
210  return nf(nf(a).F() / n).N();

◆ nrEqual()

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

Definition at line 239 of file shortfl.cc.

241 {
242  assume( getCoeffType(r) == n_R );
243 
244  number x = nrSub(a,b,r);
245  return nf(x).F() == nf((SI_FLOAT)0.0).F();

◆ nrFloat()

SI_FLOAT nrFloat ( number  n)

Converts a n_R number into a float. Needed by Maps.

Definition at line 55 of file shortfl.cc.

57 {
58  return nf(n).F();

◆ nrGreater()

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

Definition at line 232 of file shortfl.cc.

234 {
235  assume( getCoeffType(r) == n_R );
236 
237  return nf(a).F() > nf(b).F();

◆ nrGreaterZero()

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

Definition at line 68 of file shortfl.cc.

70 {
71  assume( getCoeffType(r) == n_R );
72 
73  return nf(k).F() >= 0.0;

◆ nrInit()

static number nrInit ( long  i,
const coeffs  r 
)
static

Definition at line 85 of file shortfl.cc.

87 {
88  assume( getCoeffType(r) == n_R );
89 
90  SI_FLOAT f = (SI_FLOAT)i;
91  return nf(nf(f).F()).N();

◆ nrInitChar()

BOOLEAN nrInitChar ( coeffs  n,
void *  p 
)

Initialize r.

Definition at line 708 of file shortfl.cc.

710 {
711  assume( getCoeffType(n) == n_R );
712 
713  assume( p == NULL );
714 
715  n->is_field=TRUE;
716  n->is_domain=TRUE;
717  n->rep=n_rep_float;
718 
719  //n->cfKillChar = ndKillChar; /* dummy */
720  n->ch = 0;
721  n->cfCoeffString = nrCoeffString;
722  n->cfCoeffName = nrCoeffName;
723 
724  n->cfInit = nrInit;
725  n->cfInt = nrInt;
726  n->cfAdd = nrAdd;
727  n->cfSub = nrSub;
728  n->cfMult = nrMult;
729  n->cfDiv = nrDiv;
730  n->cfExactDiv= nrDiv;
731  n->cfInpNeg = nrNeg;
732  n->cfInvers= nrInvers;
733  //n->cfCopy = ndCopy;
734  n->cfGreater = nrGreater;
735  n->cfEqual = nrEqual;
736  n->cfIsZero = nrIsZero;
737  n->cfIsOne = nrIsOne;
738  n->cfIsMOne = nrIsMOne;
739  n->cfGreaterZero = nrGreaterZero;
740  n->cfWriteLong = nrWrite;
741  n->cfRead = nrRead;
742  //n->cfPower = nrPower;
743  n->cfSetMap = nrSetMap;
744  n->cfCoeffWrite = nrCoeffWrite;
745 
746  /* nName= ndName; */
747  /*nSize = ndSize;*/
748 #ifdef LDEBUG
749  n->cfDBTest=nrDBTest; // not yet implemented: nrDBTest;
750 #endif
751 
752  //n->nCoeffIsEqual = ndCoeffIsEqual;
753 
754  n->float_len = SHORT_REAL_LENGTH;
755  n->float_len2 = SHORT_REAL_LENGTH;
756 
757  // TODO: Any variables?
758  return FALSE;

◆ nrInt()

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

Definition at line 96 of file shortfl.cc.

98 {
99  assume( getCoeffType(r) == n_R );
100 
101  long i;
102  SI_FLOAT f = nf(n).F();
103  if (((SI_FLOAT)(-MAX_INT_VAL-1) <= f) || ((SI_FLOAT)MAX_INT_VAL >= f))
104  i = (long)f;
105  else
106  i = 0;
107  return i;

◆ nrInvers()

static number nrInvers ( number  c,
const coeffs  r 
)
static

Definition at line 212 of file shortfl.cc.

214 {
215  assume( getCoeffType(r) == n_R );
216 
217  SI_FLOAT n = nf(c).F();
218  if (n == 0.0)
219  {
220  WerrorS(nDivBy0);
221  return nf((SI_FLOAT)0.0).N();
222  }
223  return nf(1.0 / n).N();

◆ nrIsMOne()

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

Definition at line 189 of file shortfl.cc.

191 {
192  assume( getCoeffType(r) == n_R );
193 
194  SI_FLOAT aa=nf(a).F()+1.0;
195  if (aa<0.0) aa=-aa;
196  return (aa<nrEps);

◆ nrIsOne()

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

Definition at line 180 of file shortfl.cc.

182 {
183  assume( getCoeffType(r) == n_R );
184 
185  SI_FLOAT aa=nf(a).F()-1.0;
186  if (aa<0.0) aa=-aa;
187  return (aa<nrEps);

◆ nrIsZero()

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

Definition at line 173 of file shortfl.cc.

175 {
176  assume( getCoeffType(r) == n_R );
177 
178  return (0.0 == nf(a).F());

◆ nrMapC()

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

Definition at line 412 of file shortfl.cc.

414 {
415  assume( getCoeffType(r) == n_R );
416  assume( getCoeffType(aRing) == n_long_C );
417 
418  gmp_float h = ((gmp_complex*)from)->real();
419  SI_FLOAT t =(SI_FLOAT)mpf_get_d((mpf_srcptr)&h);
420  return nf(t).N();

◆ nrMapLongR()

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

Definition at line 403 of file shortfl.cc.

405 {
406  assume( getCoeffType(r) == n_R );
407  assume( getCoeffType(aRing) == n_long_R );
408 
409  SI_FLOAT t =(SI_FLOAT)mpf_get_d((mpf_srcptr)from);
410  return nf(t).N();

◆ nrMapP()

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

Definition at line 393 of file shortfl.cc.

395 {
396  assume( getCoeffType(r) == n_R );
397  assume( getCoeffType(aRing) == n_Zp );
398 
399  int i = (int)((long)from);
400  SI_FLOAT f = (SI_FLOAT)i;
401  return nf(f).N();

◆ nrMapQ()

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

Definition at line 423 of file shortfl.cc.

425 {
426 /* in longrat.h
427 #define SR_INT 1
428 #define mpz_size1(A) (ABS((A)->_mp_size))
429 */
430 #define SR_HDL(A) ((long)(A))
431 #define IS_INT(A) ((A)->s==3)
432 #define IS_IMM(A) (SR_HDL(A) & SR_INT)
433 #define GET_NOM(A) ((A)->z)
434 #define GET_DENOM(A) ((A)->n)
435 
436  assume( getCoeffType(r) == n_R );
437  assume( aRing->rep == n_rep_gap_rat );
438 
439  mpz_ptr z;
440  mpz_ptr zz=NULL;
441  if (IS_IMM(from))
442  {
443  zz=(mpz_ptr)omAlloc(sizeof(mpz_t));
444  mpz_init_set_si(zz,SR_TO_INT(from));
445  z=zz;
446  }
447  else
448  {
449  /* read out the enumerator */
450  z=GET_NOM(from);
451  }
452 
453  int i = mpz_size1(z);
454  mpf_t e;
455  mpf_init(e);
456  mpf_set_z(e,z);
457  int sign= mpf_sgn(e);
458  mpf_abs (e, e);
459 
460  if (zz!=NULL)
461  {
462  mpz_clear(zz);
463  omFreeSize(zz,sizeof(mpz_t));
464  }
465  /* if number was an integer, we are done*/
466  if(IS_IMM(from)|| IS_INT(from))
467  {
468  if(i>4)
469  {
470  WerrorS("SI_FLOAT overflow");
471  return nf(0.0).N();
472  }
473  double basis;
474  signed long int exp;
475  basis = mpf_get_d_2exp(&exp, e);
476  SI_FLOAT f= sign*ldexp(basis,exp);
477  mpf_clear(e);
478  return nf(f).N();
479  }
480 
481  /* else read out the denominator */
482  mpz_ptr n = GET_DENOM(from);
483  int j = mpz_size1(n);
484  if(j-i>4)
485  {
486  WerrorS("SI_FLOAT overflow");
487  mpf_clear(e);
488  return nf(0.0).N();
489  }
490  mpf_t d;
491  mpf_init(d);
492  mpf_set_z(d,n);
493 
494  /* and compute the quotient */
495  mpf_t q;
496  mpf_init(q);
497  mpf_div(q,e,d);
498 
499  double basis;
500  signed long int exp;
501  basis = mpf_get_d_2exp(&exp, q);
502  SI_FLOAT f = sign*ldexp(basis,exp);
503  mpf_clear(e);
504  mpf_clear(d);
505  mpf_clear(q);
506  return nf(f).N();

◆ nrMapZ()

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

Definition at line 508 of file shortfl.cc.

510 {
511  assume( getCoeffType(r) == n_R );
512  assume( aRing->rep == n_rep_gap_gmp );
513 
514  mpz_ptr z;
515  mpz_ptr zz=NULL;
516  if (IS_IMM(from))
517  {
518  zz=(mpz_ptr)omAlloc(sizeof(mpz_t));
519  mpz_init_set_si(zz,SR_TO_INT(from));
520  z=zz;
521  }
522  else
523  {
524  /* read out the enumerator */
525  z=(mpz_ptr)from;
526  }
527 
528  int i = mpz_size1(z);
529  mpf_t e;
530  mpf_init(e);
531  mpf_set_z(e,z);
532  int sign= mpf_sgn(e);
533  mpf_abs (e, e);
534 
535  if (zz!=NULL)
536  {
537  mpz_clear(zz);
538  omFreeSize(zz,sizeof(mpz_t));
539  }
540  if(i>4)
541  {
542  WerrorS("float overflow");
543  return nf(0.0).N();
544  }
545  double basis;
546  signed long int exp;
547  basis = mpf_get_d_2exp(&exp, e);
548  SI_FLOAT f= sign*ldexp(basis,exp);
549  mpf_clear(e);
550  return nf(f).N();

◆ nrMult()

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

Definition at line 75 of file shortfl.cc.

77 {
78  assume( getCoeffType(r) == n_R );
79 
80  return nf(nf(a).F() * nf(b).F()).N();

◆ nrNeg()

static number nrNeg ( number  c,
const coeffs  r 
)
static

Definition at line 225 of file shortfl.cc.

227 {
228  assume( getCoeffType(r) == n_R );
229 
230  return nf(-nf(c).F()).N();

◆ nrRead()

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

Definition at line 314 of file shortfl.cc.

316 {
317 
318  assume( getCoeffType(r) == n_R );
319 
320  static const char *nIllegalChar="illegal character in number";
321 
322  const char *t;
323  const char *start=s;
324  SI_FLOAT z1,z2;
325  SI_FLOAT n=1.0;
326 
327  s = nrEatr(s, &z1);
328  if (*s == '/')
329  {
330  if (s==start) { WerrorS(nIllegalChar);return s; }
331  s++;
332  s = nrEatr(s, &z2);
333  if (z2==0.0)
334  WerrorS(nDivBy0);
335  else
336  z1 /= z2;
337  }
338  else if (*s =='.')
339  {
340  if (s==start) { WerrorS(nIllegalChar);return s; }
341  s++;
342  t = s;
343  while (*t >= '0' && *t <= '9')
344  {
345  t++;
346  n *= 10.0;
347  }
348  s = nrEatr(s, &z2);
349  z1 = (z1*n + z2) / n;
350  if (*s=='e')
351  {
352  int e=0; /* exponent */
353  int si=1;/* sign of exponent */
354  s++;
355  if (*s=='+') s++;
356  else if (*s=='-') {s++; si=-1; }
357  while (*s >= '0' && *s <= '9')
358  {
359  e=e*10+(*s)-'0';
360  s++;
361  }
362  if (si==1)
363  {
364  while (e>0) {z1*=10.0; e--; }
365  }
366  else
367  {
368  while (e>0) {z1/=10.0; e--; }
369  }
370  }
371  }
372  *a = nf(z1).N();
373  return s;

◆ nrSetMap()

static nMapFunc nrSetMap ( const coeffs  src,
const coeffs  dst 
)
static

Get a mapping function from src into the domain of this type: n_R.

Definition at line 667 of file shortfl.cc.

669 {
670  assume( getCoeffType(dst) == n_R );
671 
672  if (src->rep==n_rep_gap_rat) /*Q, Z */
673  {
674  return nrMapQ;
675  }
676  if (src->rep==n_rep_gap_gmp) /*Q, Z */
677  {
678  return nrMapZ;
679  }
680  if ((src->rep==n_rep_gmp_float) && nCoeff_is_long_R(src))
681  {
682  return nrMapLongR;
683  }
684  if ((src->rep==n_rep_float) && nCoeff_is_R(src))
685  {
686  return ndCopyMap;
687  }
688  if ((src->rep==n_rep_int) && nCoeff_is_Zp(src))
689  {
690  return nrMapP;
691  }
692  if ((src->rep==n_rep_gmp_complex) && nCoeff_is_long_C(src))
693  {
694  return nrMapC;
695  }
696  return NULL;

◆ nrSub()

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

Definition at line 141 of file shortfl.cc.

143 {
144  assume( getCoeffType(r) == n_R );
145 
146  SI_FLOAT x = nf(a).F();
147  SI_FLOAT y = nf(b).F();
148  SI_FLOAT f = x - y;
149  if (x > 0.0)
150  {
151  if (y > 0.0)
152  {
153  x = f / (x + y);
154  if (x < 0.0)
155  x = -x;
156  if (x < nrEps)
157  f = 0.0;
158  }
159  }
160  else
161  {
162  if (y < 0.0)
163  {
164  x = f / (x + y);
165  if (x < 0.0)
166  x = -x;
167  if (x < nrEps)
168  f = 0.0;
169  }
170  }
171  return nf(f).N();

◆ nrWrite()

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

Definition at line 247 of file shortfl.cc.

249 {
250  assume( getCoeffType(r) == n_R );
251 
252  //#if SIZEOF_DOUBLE == SIZEOF_LONG
253  //char ch[16];
254  //int n = sprintf(ch,"%12.6e", nf(a).F());
255  //#else
256  char ch[11];
257  int n = sprintf(ch,"%9.3e", nf(a).F());
258  //#endif
259  if (ch[0] == '-')
260  {
261  char* chbr = new char[n+3];
262  memcpy(&chbr[2],&ch[1],n-1);
263  chbr[0] = '-';
264  chbr[1] = '(';
265  chbr[n+1] = ')';
266  chbr[n+2] = '\0';
267  StringAppendS(chbr);
268  delete[] chbr;
269  }
270  else
271  StringAppend("(%s)",ch);

Variable Documentation

◆ nrEps

const SI_FLOAT nrEps = 1.0e-3
static

Definition at line 37 of file shortfl.cc.

getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:420
IS_IMM
#define IS_IMM(A)
n_rep_gap_rat
(number), see longrat.h
Definition: coeffs.h:110
nrInt
static long nrInt(number &n, const coeffs r)
Definition: shortfl.cc:96
nrMapZ
static number nrMapZ(number from, const coeffs aRing, const coeffs r)
Definition: shortfl.cc:508
FALSE
#define FALSE
Definition: auxiliary.h:96
nrRead
static const char * nrRead(const char *s, number *a, const coeffs r)
Definition: shortfl.cc:314
nCoeff_is_Zp
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
Definition: coeffs.h:821
StringAppendS
void StringAppendS(const char *st)
Definition: reporter.cc:106
j
int j
Definition: facHensel.cc:105
f
FILE * f
Definition: checklibs.c:9
nrSetMap
static nMapFunc nrSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type: n_R.
Definition: shortfl.cc:667
nCoeff_is_R
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
Definition: coeffs.h:857
k
int k
Definition: cfEzgcd.cc:92
nrCoeffString
static char * nrCoeffString(const coeffs r)
Definition: shortfl.cc:698
x
Variable x
Definition: cfModGcd.cc:4023
y
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
nrGreater
static BOOLEAN nrGreater(number a, number b, const coeffs r)
Definition: shortfl.cc:232
nrIsMOne
static BOOLEAN nrIsMOne(number a, const coeffs r)
Definition: shortfl.cc:189
SHORT_REAL_LENGTH
#define SHORT_REAL_LENGTH
Definition: numbers.h:56
n_long_C
complex floating point (GMP) numbers
Definition: coeffs.h:41
GET_NOM
#define GET_NOM(A)
h
STATIC_VAR Poly * h
Definition: janet.cc:971
n_rep_float
(float), see shortfl.h
Definition: coeffs.h:115
omStrDup
#define omStrDup(s)
Definition: omAllocDecl.h:261
sign
static int sign(int x)
Definition: ring.cc:3374
ndCopyMap
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
Definition: numbers.cc:251
n_rep_int
(int), see modulop.h
Definition: coeffs.h:109
nCoeff_is_long_C
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
Definition: coeffs.h:915
b
CanonicalForm b
Definition: cfModGcd.cc:4044
nrDBTest
static BOOLEAN nrDBTest(number a, const coeffs r, const char *f, const int l)
nf
Definition: gnumpfl.cc:25
n_long_R
real floating point (GMP) numbers
Definition: coeffs.h:33
nrWrite
static void nrWrite(number a, const coeffs r)
Definition: shortfl.cc:247
nrDiv
static number nrDiv(number a, number b, const coeffs r)
Definition: shortfl.cc:198
TRUE
#define TRUE
Definition: auxiliary.h:100
i
int i
Definition: cfEzgcd.cc:125
nf::F
SI_FLOAT F() const
Definition: gnumpfl.cc:31
nDivBy0
const char *const nDivBy0
Definition: numbers.h:87
PrintS
void PrintS(const char *s)
Definition: reporter.cc:283
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:258
nrAdd
static number nrAdd(number a, number b, const coeffs r)
Definition: shortfl.cc:109
nrMapQ
static number nrMapQ(number from, const coeffs r, const coeffs aRing)
Definition: shortfl.cc:423
nrEps
static const SI_FLOAT nrEps
Definition: shortfl.cc:37
IS_INT
#define IS_INT(A)
nCoeff_is_long_R
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
Definition: coeffs.h:912
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:208
nrCoeffWrite
static void nrCoeffWrite(const coeffs r, BOOLEAN)
Definition: shortfl.cc:61
n_R
single prescision (6,6) real numbers
Definition: coeffs.h:31
exp
gmp_float exp(const gmp_float &a)
Definition: mpr_complex.cc:356
SR_TO_INT
#define SR_TO_INT(SR)
Definition: longrat.h:67
nrMapLongR
static number nrMapLongR(number from, const coeffs aRing, const coeffs r)
Definition: shortfl.cc:403
n_Zp
\F{p < 2^31}
Definition: coeffs.h:29
n_rep_gmp_float
(gmp_float), see
Definition: coeffs.h:116
nrMapP
static number nrMapP(number from, const coeffs aRing, const coeffs r)
Definition: shortfl.cc:393
mpz_size1
#define mpz_size1(A)
Definition: si_gmp.h:12
nrMult
static number nrMult(number a, number b, const coeffs r)
Definition: shortfl.cc:75
nrCoeffName
static char * nrCoeffName(const coeffs r)
Definition: shortfl.cc:703
WerrorS
void WerrorS(const char *s)
Definition: feFopen.cc:24
nrInvers
static number nrInvers(number c, const coeffs r)
Definition: shortfl.cc:212
nrIsOne
static BOOLEAN nrIsOne(number a, const coeffs r)
Definition: shortfl.cc:180
assume
#define assume(x)
Definition: mod2.h:384
nrGreaterZero
static BOOLEAN nrGreaterZero(number k, const coeffs r)
Definition: shortfl.cc:68
NULL
#define NULL
Definition: omList.c:11
nrSub
static number nrSub(number a, number b, const coeffs r)
Definition: shortfl.cc:141
nrInit
static number nrInit(long i, const coeffs r)
Definition: shortfl.cc:85
StringAppend
#define StringAppend
Definition: emacs.cc:78
nrNeg
static number nrNeg(number c, const coeffs r)
Definition: shortfl.cc:225
p
int p
Definition: cfModGcd.cc:4019
s
const CanonicalForm int s
Definition: facAbsFact.cc:55
nrMapC
static number nrMapC(number from, const coeffs aRing, const coeffs r)
Definition: shortfl.cc:412
nf::N
number N() const
Definition: gnumpfl.cc:32
SI_FLOAT
#define SI_FLOAT
Definition: shortfl.h:14
nrEqual
static BOOLEAN nrEqual(number a, number b, const coeffs r)
Definition: shortfl.cc:239
GET_DENOM
#define GET_DENOM(A)
n_rep_gmp_complex
(gmp_complex), see gnumpc.h
Definition: coeffs.h:117
gmp_float
Definition: mpr_complex.h:30
MAX_INT_VAL
const int MAX_INT_VAL
Definition: mylimits.h:11
nrIsZero
static BOOLEAN nrIsZero(number a, const coeffs r)
Definition: shortfl.cc:173
gmp_complex
gmp_complex numbers based on
Definition: mpr_complex.h:177
n_rep_gap_gmp
(), see rinteger.h, new impl.
Definition: coeffs.h:111