240 if ( (
exp & 1) == 1 )
295 return (*aa) > (*bb);
307 return (*aa) == (*bb);
340 const int N = strlen(complex_parameter);
342 if ((*
s >=
'0') && (*
s <=
'9'))
350 else if (strncmp(
s, complex_parameter,
N)==0)
397 (
p->float_len == r->float_len) &&
398 (
p->float_len2 == r->float_len2)
412 for(
int i = 1;
i <= P;
i++ )
423 sprintf(ngcCoeffName_buf,
"complex,%d,%d,%s",r->float_len,r->float_len2,
p);
424 return ngcCoeffName_buf;
669 n->iNumberOfParameters = 1;
672 char ** pParameterNames = (
char **)
omAlloc0(
sizeof(
char *));
674 if( parameter !=
NULL)
677 pParameterNames[0] =
omStrDup(
p->par_name);
680 n->float_len =
p->float_len;
681 n->float_len2 =
p->float_len2;
693 n->pParameterNames = (
const char**)pParameterNames;
Rational abs(const Rational &a)
const CanonicalForm CFMap CFMap & N
static CanonicalForm oneNorm(const CanonicalForm &F)
gmp_complex numbers based on
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
@ n_R
single prescision (6,6) real numbers
@ n_long_R
real floating point (GMP) numbers
@ n_long_C
complex floating point (GMP) numbers
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
@ n_rep_gap_rat
(number), see longrat.h
@ n_rep_gap_gmp
(), see rinteger.h, new impl.
@ n_rep_float
(float), see shortfl.h
@ n_rep_int
(int), see modulop.h
@ n_rep_gmp_float
(gmp_float), see
@ n_rep_gmp_complex
(gmp_complex), see gnumpc.h
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
const CanonicalForm int s
bool isZero(const CFArray &A)
checks if entries of A are zero
void WerrorS(const char *s)
static number ngcMapQ(number from, const coeffs aRing, const coeffs r)
static void ngcKillChar(coeffs r)
static number ngcImPart(number a, const coeffs r)
static number ngcDiv(number a, number b, const coeffs r)
static void ngcDelete(number *a, const coeffs r)
static void ngcInpMult(number &a, number b, const coeffs R)
static BOOLEAN ngcDBTest(number, const char *, const int, const coeffs r)
static number ngcSub(number a, number b, const coeffs R)
static number ngcMapP(number from, const coeffs aRing, const coeffs r)
static number ngcCopyMap(number from, const coeffs aRing, const coeffs r)
static number ngcCopy(number a, const coeffs r)
static number ngcInvers(number a, const coeffs R)
static number ngcInitMPZ(mpz_t m, const coeffs)
void ngcSetChar(const coeffs r)
BOOLEAN ngcInitChar(coeffs n, void *parameter)
Initialize r (n_long_C)
static number ngcMapZ(number from, const coeffs aRing, const coeffs r)
static void ngcPower(number x, int exp, number *u, const coeffs r)
static number ngcAdd(number a, number b, const coeffs R)
static number ngcMapLongR(number from, const coeffs aRing, const coeffs r)
static nMapFunc ngcSetMap(const coeffs src, const coeffs dst)
static BOOLEAN ngcIsMOne(number a, const coeffs r)
static BOOLEAN ngcCoeffIsEqual(const coeffs r, n_coeffType n, void *parameter)
static BOOLEAN ngcGreaterZero(number a, const coeffs r)
static number ngcInit(long i, const coeffs r)
static number ngcRePart(number a, const coeffs r)
static void ngcCoeffWrite(const coeffs r, BOOLEAN)
static BOOLEAN ngcGreater(number a, number b, const coeffs r)
static number ngcParameter(int i, const coeffs r)
static void ngcWrite(number a, const coeffs r)
static int ngcSize(number n, const coeffs R)
static number ngcNeg(number a, const coeffs R)
static const char * ngcRead(const char *s, number *a, const coeffs r)
static BOOLEAN ngcIsZero(number a, const coeffs r)
static number ngcMult(number a, number b, const coeffs R)
static void ngcInpAdd(number &a, number b, const coeffs R)
static char * ngcCoeffName(const coeffs r)
static BOOLEAN ngcIsOne(number a, const coeffs r)
static number ngcMapR(number from, const coeffs aRing, const coeffs r)
static long ngcInt(number &i, const coeffs r)
static BOOLEAN ngcEqual(number a, number b, const coeffs r)
const char * ngfRead(const char *start, number *a, const coeffs r)
long npInt(number &n, const coeffs r)
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
gmp_float exp(const gmp_float &a)
gmp_float numberFieldToFloat(number num, int cf)
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...
The main handler for Singular numbers which are suitable for Singular polynomials.
const char *const nDivBy0
#define SHORT_REAL_LENGTH
#define omFreeSize(addr, size)
void StringAppendS(const char *st)
SI_FLOAT nrFloat(number n)
Converts a n_R number into a float. Needed by Maps.