62 nf(number n) {_n = n;}
63 float F()
const {
return _f;}
64 number
N()
const {
return _n;}
129 static number ngfCopyMap(number
a,
const coeffs r1,
const coeffs r2)
316 while ((*s >=
'0' && *s <=
'9')||(*s ==
'.')) s++;
321 if ( (s != start) && ((*s ==
'e')||(*s==
'E')))
325 if ((*s ==
'+') || (*s ==
'-')) s++;
326 while ((*s >=
'0' && *s <=
'9')) s++;
342 char *
s= (
char *)start;
375 Werror(
"wrong long real format: %s",start2);
436 snprintf(s,27,
"real,%d,%d",r->float_len,r->float_len2);
442 static char ngfCoeffName_buf[27];
444 snprintf(ngfCoeffName_buf,27,
"real,%d,%d",r->float_len,r->float_len2);
446 snprintf(ngfCoeffName_buf,27,
"RR(%d,%d)",r->float_len,r->float_len2);
448 return ngfCoeffName_buf;
495 if( parameter !=
NULL)
604 Print(
"// characteristic : 0 (real:%d digits, additional %d digits)\n",
605 r->float_len,r->float_len2);
BOOLEAN ngfCoeffIsEqual(const coeffs r, n_coeffType n, void *parameter)
static char * ngfCoeffString(const coeffs r)
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
const CanonicalForm int s
number ngfAdd(number la, number li, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
#define SHORT_REAL_LENGTH
BOOLEAN ngfEqual(number a, number b, const coeffs r)
long npInt(number &n, const coeffs r)
number ngfMapZ(number from, const coeffs aRing, const coeffs r)
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
void ngfCoeffWrite(const coeffs r, BOOLEAN details)
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
(), see rinteger.h, new impl.
void setFromStr(const char *in)
number ngfMapQ(number from, const coeffs src, const coeffs r)
void WerrorS(const char *s)
gmp_complex numbers based on
number ngfInvers(number a, const coeffs r)
number ngfDiv(number a, number b, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
static number ngfMapC(number from, const coeffs src, const coeffs dst)
void ngfDelete(number *a, const coeffs r)
real floating point (GMP) numbers
short float_len2
additional char-flags, rInit
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
single prescision (6,6) real numbers
short float_len
additional char-flags, rInit
Coefficient rings, fields and other domains suitable for Singular polynomials.
BOOLEAN ngfIsMOne(number a, const coeffs r)
The main handler for Singular numbers which are suitable for Singular polynomials.
void StringAppendS(const char *st)
nMapFunc ngfSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type:
const char * ngfRead(const char *s, number *a, const coeffs r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
complex floating point (GMP) numbers
(gmp_complex), see gnumpc.h
static char * ngfEatFloatNExp(char *s)
void ngfWrite(number a, const coeffs r)
static number ngfMapR(number from, const coeffs src, const coeffs dst)
BOOLEAN ngfGreater(number a, number b, const coeffs r)
BOOLEAN ngfGreaterZero(number za, const coeffs r)
Note: MAY NOT WORK AS EXPECTED!
BOOLEAN ngfIsOne(number a, const coeffs r)
const char *const nDivBy0
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static number ngfMapP(number from, const coeffs src, const coeffs dst)
number ngfCopy(number a, const coeffs r)
number ngfInit(long i, const coeffs r)
char * floatToStr(const gmp_float &r, const unsigned int oprec)
BOOLEAN ngfInitChar(coeffs n, void *parameter)
Initialize r.
gmp_float numberFieldToFloat(number num, int k, const coeffs src)
static char * ngfCoeffName(const coeffs r)
void ngfSetChar(const coeffs r)
number ngfMult(number a, number b, const coeffs r)
number ngfSub(number la, number li, const coeffs r)
bool isZero(const CFArray &A)
checks if entries of A are zero
void ngfPower(number x, int exp, number *lu, const coeffs r)
void setGMPFloatDigits(size_t digits, size_t rest)
Set size of mantissa digits - the number of output digits (basis 10) the size of mantissa consists of...
BOOLEAN ngfIsZero(number za, const coeffs r)
number ngf_Copy(number a, coeffs r)
long ngfInt(number &n, const coeffs r)
void Werror(const char *fmt,...)
int ngfSize(number n, const coeffs r)
number ngfNeg(number za, const coeffs r)