233 if ( (exp & 1) == 1 )
289 return (*aa) > (*bb);
301 return (*aa) == (*bb);
334 const int N = strlen(complex_parameter);
336 if ((*s >=
'0') && (*s <=
'9'))
344 else if (strncmp(s, complex_parameter, N)==0)
406 for(
int i = 1;
i <= P;
i++ )
416 char *
s=(
char*)
omAlloc(31+strlen(p));
417 sprintf(s,
"complex,%d,%d,%s",r->float_len,r->float_len2,p);
423 static char ngcCoeffName_buf[40];
425 if (ngcCoeffName_buf!=
NULL)
omFree(ngcCoeffName_buf);
426 sprintf(ngcCoeffName_buf,
"complex,%d,%d,%s",r->float_len,r->float_len2,p);
427 return ngcCoeffName_buf;
662 n->iNumberOfParameters = 1;
665 char ** pParameterNames = (
char **)
omAlloc0(
sizeof(
char *));
667 if( parameter !=
NULL)
686 n->pParameterNames = (
const char**)pParameterNames;
static void ngcKillChar(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 void ngcCoeffWrite(const coeffs r, BOOLEAN)
static number ngcInvers(number a, const coeffs R)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
#define SHORT_REAL_LENGTH
static BOOLEAN ngcGreater(number a, number b, const coeffs r)
gmp_float exp(const gmp_float &a)
long npInt(number &n, const coeffs r)
static number ngcMapR(number from, const coeffs aRing, const coeffs r)
static number ngcNeg(number a, const coeffs R)
static number ngcMapZ(number from, const coeffs aRing, const coeffs r)
static number ngcMapQ(number from, const coeffs aRing, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
static long ngcInt(number &i, const coeffs r)
static number ngcSub(number a, number b, const coeffs R)
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
#define omFreeSize(addr, size)
(), see rinteger.h, new impl.
static BOOLEAN ngcCoeffIsEqual(const coeffs r, n_coeffType n, void *parameter)
static void ngcPower(number x, int exp, number *u, const coeffs r)
void WerrorS(const char *s)
gmp_complex numbers based on
static number ngcMult(number a, number b, const coeffs R)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
static number ngcDiv(number a, number b, const coeffs r)
Rational abs(const Rational &a)
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 ngcMapP(number from, const coeffs aRing, const coeffs r)
static BOOLEAN ngcIsZero(number a, const coeffs r)
static char * ngcCoeffString(const coeffs r)
single prescision (6,6) real numbers
void ngcSetChar(const coeffs r)
BOOLEAN ngcInitChar(coeffs n, void *parameter)
Initialize r (n_long_C)
short float_len
additional char-flags, rInit
static int ngcSize(number n, const coeffs R)
Coefficient rings, fields and other domains suitable for Singular polynomials.
const CanonicalForm CFMap CFMap & N
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
static BOOLEAN ngcEqual(number a, number b, const coeffs r)
static char * ngcCoeffName(const coeffs r)
complex floating point (GMP) numbers
(gmp_complex), see gnumpc.h
static number ngcParameter(int i, const coeffs r)
static number ngcRePart(number a, const coeffs r)
BOOLEAN ngcDBTest(number a, const char *f, const int l, const coeffs r)
const char *const nDivBy0
static number ngcInit(long i, 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 nMapFunc ngcSetMap(const coeffs src, const coeffs dst)
static BOOLEAN ngcGreaterZero(number a, const coeffs r)
static BOOLEAN ngcIsOne(number a, const coeffs r)
static number ngcAdd(number a, number b, const coeffs R)
bool isZero(const CFArray &A)
checks if entries of A are zero
const char * par_name
parameter name
static number ngcImPart(number a, const coeffs r)
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
static const char * ngcRead(const char *s, number *a, const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
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 ngcCopyMap(number from, const coeffs aRing, const coeffs r)
static number ngcMapLongR(number from, const coeffs aRing, const coeffs r)
SI_FLOAT nrFloat(number n)
Converts a n_R number into a float. Needed by Maps.
static void ngcDelete(number *a, const coeffs r)
static CanonicalForm oneNorm(const CanonicalForm &F)
static number ngcCopy(number a, const coeffs r)
static void ngcWrite(number a, const coeffs r)
static BOOLEAN ngcIsMOne(number a, const coeffs r)