32 nf(number n) {_n = n;}
33 float F()
const {
return _f;}
34 number
N()
const {
return _n;}
106 static number ngfCopyMap(number
a,
const coeffs r1,
const coeffs r2)
286 while ((*s >=
'0' && *s <=
'9')||(*s ==
'.')) s++;
291 if ( (s != start) && ((*s ==
'e')||(*s==
'E')))
295 if ((*s ==
'+') || (*s ==
'-')) s++;
296 while ((*s >=
'0' && *s <=
'9')) s++;
312 char *
s= (
char *)start;
345 Werror(
"wrong long real format: %s",start2);
406 snprintf(s,27,
"real,%d,%d",r->float_len,r->float_len2);
412 static char ngfCoeffName_buf[27];
413 snprintf(ngfCoeffName_buf,27,
"RR(%d,%d)",r->float_len,r->float_len2);
414 return ngfCoeffName_buf;
505 Print(
"float(real:%d digits, additional %d digits)",
506 r->float_len,r->float_len2);
553 if( parameter !=
NULL)
static BOOLEAN ngfEqual(number a, number b, const coeffs r)
static char * ngfCoeffString(const coeffs r)
static void ngfSetChar(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
static BOOLEAN ngfCoeffIsEqual(const coeffs r, n_coeffType n, void *parameter)
static number ngfInvers(number a, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
#define SHORT_REAL_LENGTH
long npInt(number &n, const coeffs r)
static number ngfPower(number x, int exp, const coeffs r)
static BOOLEAN ngfIsZero(number a, const coeffs r)
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
static int ngfSize(number n, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
(), see rinteger.h, new impl.
void setFromStr(const char *in)
static long ngfInt(number &i, const coeffs r)
void WerrorS(const char *s)
static number ngfNeg(number a, const coeffs r)
gmp_complex numbers based on
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
static number ngfMapC(number from, const coeffs src, const coeffs dst)
static void ngfCoeffWrite(const coeffs r, BOOLEAN)
static BOOLEAN ngfGreater(number a, number b, 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.
static number ngfInit(long i, const coeffs r)
single prescision (6,6) real numbers
short float_len
additional char-flags, rInit
Coefficient rings, fields and other domains suitable for Singular polynomials.
The main handler for Singular numbers which are suitable for Singular polynomials.
void StringAppendS(const char *st)
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)
static number ngfMapR(number from, const coeffs src, const coeffs dst)
const char *const nDivBy0
static void ngfWrite(number a, const coeffs r)
gmp_float numberFieldToFloat(number num, int cf)
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)
static number ngfDiv(number a, number b, const coeffs r)
static BOOLEAN ngfIsMOne(number a, const coeffs r)
static BOOLEAN ngfGreaterZero(number a, const coeffs r)
static number ngfMapZ(number from, const coeffs aRing, const coeffs r)
static number ngfMult(number a, number b, const coeffs R)
char * floatToStr(const gmp_float &r, const unsigned int oprec)
BOOLEAN ngfInitChar(coeffs n, void *parameter)
Initialize r.
static number ngfCopy(number a, const coeffs r)
static char * ngfCoeffName(const coeffs r)
static number ngfMapQ(number from, const coeffs src, const coeffs dst)
bool isZero(const CFArray &A)
checks if entries of A are zero
static void ngfDelete(number *a, 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...
static number ngfAdd(number a, number b, const coeffs R)
static BOOLEAN ngfIsOne(number a, const coeffs r)
static number ngfSub(number a, number b, const coeffs R)
void Werror(const char *fmt,...)
static nMapFunc ngfSetMap(const coeffs src, const coeffs dst)