90 return (number)(
new gmp_complex( (
long)0, (
long)1 ));
269 if ( (exp & 1) == 1 )
332 return (*aa) > (*bb);
344 return (*aa) == (*bb);
377 const int N = strlen(complex_parameter);
379 if ((*s >=
'0') && (*s <=
'9'))
387 else if (strncmp(s, complex_parameter, N)==0)
429 && (6==r->float_len2)
449 for(
int i = 1;
i <=
P;
i++ )
459 char *
s=(
char*)
omAlloc(31+strlen(p));
460 sprintf(s,
"complex,%d,%d,%s",r->float_len,r->float_len2,p);
513 n->nNULL = n->cfInit(0,n);
574 n->iNumberOfParameters = 1;
579 if( parameter !=
NULL)
598 n->pParameterNames = (
const char**)pParameterNames;
734 Print(
"// characteristic : 0 (complex:%d digits, additional %d digits)\n",
735 r->float_len, r->float_len2);
void ngcPower(number x, int exp, number *lu, const coeffs r)
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
number ngcRePart(number a, const coeffs r)
void ngcDelete(number *a, const coeffs r)
number ngcInit(long i, const coeffs r)
void ngcWrite(number a, const coeffs r)
number ngcImPart(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 ngcMapR(number from, const coeffs aRing, const coeffs r)
char const ** pParameterNames
array containing the names of Parameters (default NULL)
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
nMapFunc ngcSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type: long_C!
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
#define omFreeSize(addr, size)
long ngcInt(number &n, const coeffs r)
(), see rinteger.h, new impl.
number ngcMapZ(number from, const coeffs aRing, const coeffs r)
number ngcDiv(number a, number b, const coeffs r)
number ngcMapQ(number from, const coeffs r, const coeffs aRing)
void WerrorS(const char *s)
gmp_complex numbers based on
int ngcSize(number n, const coeffs R)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
BOOLEAN ngcCoeffIsEqual(const coeffs r, n_coeffType n, void *parameter)
Rational abs(const Rational &a)
real floating point (GMP) numbers
short float_len2
additional char-flags, rInit
void ngcCoeffWrite(const coeffs r, BOOLEAN details)
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 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
float nrFloat(number n)
Converts a n_R number into a float. Needed by Maps.
Coefficient rings, fields and other domains suitable for Singular polynomials.
BOOLEAN ngcGreaterZero(number za, const coeffs r)
Note: MAY NOT WORK AS EXPECTED!
const CanonicalForm CFMap CFMap & N
static const n_coeffType ID
Our Type!
number ngcSub(number la, number li, const coeffs r)
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
BOOLEAN ngcDBTest(number a, const char *f, const int l, const coeffs r)
const char *const nDivBy0
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
BOOLEAN ngcIsOne(number a, const coeffs r)
BOOLEAN ngcIsZero(number za, const coeffs r)
BOOLEAN ngcIsMOne(number a, const coeffs r)
number ngcMult(number a, number b, const coeffs r)
number ngcAdd(number la, number li, const coeffs r)
const char * ngcRead(const char *s, number *a, const coeffs r)
BOOLEAN ngcGreater(number a, number b, const coeffs r)
gmp_float numberFieldToFloat(number num, int k, const coeffs src)
number ngcParameter(int i, const coeffs r)
bool isZero(const CFArray &A)
checks if entries of A are zero
const char * par_name
parameter name
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
number ngc_Copy(number a, 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...
number ngcInvers(number a, const coeffs r)
static number ngcCopyMap(number from, const coeffs aRing, const coeffs r)
static number ngcMapLongR(number from, const coeffs aRing, const coeffs r)
number ngcNeg(number za, const coeffs r)
static CanonicalForm oneNorm(const CanonicalForm &F)
BOOLEAN ngcEqual(number a, number b, const coeffs r)
number ngcCopy(number a, const coeffs r)