 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the documentation of this file.
47 nf(number n):
_n(n){};
50 inline number
N()
const {
return _n;}
73 return nf(
k).
F() >= 0.0;
80 return nf(
nf(a).F() *
nf(
b).F()).
N();
110 static number
nrAdd (number a, number
b,
const coeffs r)
142 static number
nrSub (number a, number
b,
const coeffs r)
178 return (0.0 ==
nf(a).F());
210 return nf(
nf(a).F() / n).
N();
223 return nf(1.0 / n).
N();
230 return nf(-
nf(c).F()).
N();
257 int n = sprintf(ch,
"%9.3e",
nf(a).F());
261 char* chbr =
new char[n+3];
262 memcpy(&chbr[2],&ch[1],n-1);
275 static void nrPower (number a,
int i, number *
result,
const coeffs r)
295 static const char* nrEatr(
const char *
s,
SI_FLOAT *r)
299 if (*
s >=
'0' && *
s <=
'9')
308 while (*
s >=
'0' && *
s <=
'9');
315 static const char *
nrRead (
const char *
s, number *a,
const coeffs r)
320 static const char *nIllegalChar=
"illegal character in number";
330 if (
s==start) {
WerrorS(nIllegalChar);
return s; }
340 if (
s==start) {
WerrorS(nIllegalChar);
return s; }
343 while (*t >=
'0' && *t <=
'9')
349 z1 = (z1*n + z2) / n;
356 else if (*
s==
'-') {
s++; si=-1; }
357 while (*
s >=
'0' && *
s <=
'9')
364 while (e>0) {z1*=10.0; e--; }
368 while (e>0) {z1/=10.0; e--; }
385 #pragma GCC diagnostic ignored "-Wunused-parameter"
399 int i = (int)((
long)from);
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)
443 zz=(mpz_ptr)
omAlloc(
sizeof(mpz_t));
457 int sign= mpf_sgn(e);
475 basis = mpf_get_d_2exp(&
exp, e);
501 basis = mpf_get_d_2exp(&
exp, q);
518 zz=(mpz_ptr)
omAlloc(
sizeof(mpz_t));
532 int sign= mpf_sgn(e);
547 basis = mpf_get_d_2exp(&
exp, e);
706 return (
char*)
"Float()";
730 n->cfExactDiv=
nrDiv;
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static long nrInt(number &n, const coeffs r)
static number nrMapZ(number from, const coeffs aRing, const coeffs r)
static const char * nrRead(const char *s, number *a, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
void StringAppendS(const char *st)
static nMapFunc nrSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type: n_R.
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
static char * nrCoeffString(const coeffs r)
const CanonicalForm int const CFList const Variable & y
static BOOLEAN nrGreater(number a, number b, const coeffs r)
static BOOLEAN nrIsMOne(number a, const coeffs r)
#define SHORT_REAL_LENGTH
complex floating point (GMP) numbers
SI_FLOAT nrFloat(number n)
Converts a n_R number into a float. Needed by Maps.
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
const CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
static BOOLEAN nrDBTest(number a, const coeffs r, const char *f, const int l)
real floating point (GMP) numbers
static void nrWrite(number a, const coeffs r)
static number nrDiv(number a, number b, const coeffs r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
const char *const nDivBy0
void PrintS(const char *s)
#define omFreeSize(addr, size)
static number nrAdd(number a, number b, const coeffs r)
static number nrMapQ(number from, const coeffs r, const coeffs aRing)
static const SI_FLOAT nrEps
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
static void nrCoeffWrite(const coeffs r, BOOLEAN)
single prescision (6,6) real numbers
gmp_float exp(const gmp_float &a)
BOOLEAN nrInitChar(coeffs n, void *p)
Initialize r.
static number nrMapLongR(number from, const coeffs aRing, const coeffs r)
static number nrMapP(number from, const coeffs aRing, const coeffs r)
static number nrMult(number a, number b, const coeffs r)
static char * nrCoeffName(const coeffs r)
void WerrorS(const char *s)
static number nrInvers(number c, const coeffs r)
static BOOLEAN nrIsOne(number a, const coeffs r)
static BOOLEAN nrGreaterZero(number k, const coeffs r)
static number nrSub(number a, number b, const coeffs r)
static number nrInit(long i, const coeffs r)
static number nrNeg(number c, const coeffs r)
const CanonicalForm int s
static number nrMapC(number from, const coeffs aRing, const coeffs r)
static BOOLEAN nrEqual(number a, number b, const coeffs r)
(gmp_complex), see gnumpc.h
static BOOLEAN nrIsZero(number a, const coeffs r)
gmp_complex numbers based on
(), see rinteger.h, new impl.