Go to the source code of this file.
|
#define | nCopy(n) n_Copy(n, currRing->cf) |
|
#define | nDelete(n) n_Delete(n, currRing->cf) |
|
#define | nMult(n1, n2) n_Mult(n1, n2, currRing->cf) |
|
#define | nAdd(n1, n2) n_Add(n1, n2, currRing->cf) |
|
#define | nIsZero(n) n_IsZero(n, currRing->cf) |
|
#define | nEqual(n1, n2) n_Equal(n1, n2, currRing->cf) |
|
#define | nInpNeg(n) n_InpNeg(n, currRing->cf) |
|
#define | nSub(n1, n2) n_Sub(n1, n2, currRing->cf) |
|
#define | nGetChar() n_GetChar(currRing->cf) |
|
#define | nInit(i) n_Init(i, currRing->cf) |
|
#define | nIsOne(n) n_IsOne(n, currRing->cf) |
|
#define | nIsMOne(n) n_IsMOne(n, currRing->cf) |
|
#define | nGreaterZero(n) n_GreaterZero(n, currRing->cf) |
|
#define | nGreater(a, b) n_Greater (a,b,currRing->cf) |
|
#define | nWrite(n) n_Write(n, currRing->cf, rShortOut(currRing)) |
|
#define | nNormalize(n) n_Normalize(n,currRing->cf) |
|
#define | nGcd(a, b) n_Gcd(a,b,currRing->cf) |
|
#define | nDiv(a, b) n_Div(a,b,currRing->cf) |
|
#define | nInvers(a) n_Invers(a,currRing->cf) |
|
#define | nExactDiv(a, b) n_ExactDiv(a,b,currRing->cf) |
|
#define | nTest(a) n_Test(a,currRing->cf) |
|
#define | nInpMult(a, b) n_InpMult(a,b,currRing->cf) |
|
#define | nPower(a, b, res) n_Power(a,b,res,currRing->cf) |
|
#define | nSize(n) n_Size(n,currRing->cf) |
|
#define | nGetDenom(N) n_GetDenom((N),currRing->cf) |
|
#define | nGetNumerator(N) n_GetNumerator((N),currRing->cf) |
|
#define | nSetMap(R) n_SetMap(R,currRing->cf) |
|
#define | nPrint(a) n_Print(a,currRing->cf) |
| only for debug, over any initialized currRing
|
|
#define | SHORT_REAL_LENGTH 6 |
|
|
number | ndGcd (number a, number b, const coeffs) |
|
number | ndQuotRem (number a, number b, number *r, const coeffs R) |
|
CanonicalForm | ndConvSingNFactoryN (number, BOOLEAN, const coeffs) |
|
number | ndReadFd (const ssiInfo *f, const coeffs r) |
|
BOOLEAN | n_IsZeroDivisor (number a, const coeffs r) |
| Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementation: should ONLY be used for debug stuff /tests.
|
|
void | ndNormalize (number &, const coeffs) |
|
n_coeffType | nRegister (n_coeffType n, cfInitCharProc p) |
|
void | nRegisterCfByName (cfInitCfByNameProc p, n_coeffType n) |
|
coeffs | nFindCoeffByName (char *n) |
| find an existing coeff by its "CoeffName"
|
|
char * | nEati (char *s, int *i, int m) |
| divide by the first (leading) number and return it, i.e. make monic
|
|
char * | nEati (char *s, long *i, int m) |
|
char * | nEatLong (char *s, mpz_ptr i) |
| extracts a long integer from s, returns the rest
|
|
◆ nAdd
◆ nCopy
◆ nDelete
◆ nDiv
◆ nEqual
◆ nExactDiv
◆ nGcd
◆ nGetChar
◆ nGetDenom
◆ nGetNumerator
◆ nGreater
◆ nGreaterZero
◆ nInit
◆ nInpMult
◆ nInpNeg
◆ nInvers
◆ nIsMOne
◆ nIsOne
◆ nIsZero
◆ nMult
◆ nNormalize
◆ nPower
◆ nPrint
only for debug, over any initialized currRing
Definition at line 46 of file numbers.h.
◆ nSetMap
◆ nSize
◆ nSub
◆ nTest
◆ nWrite
◆ SHORT_REAL_LENGTH
◆ cfInitCfByNameProc
initialize an object of type coeffs by its name, return NULL otherwise
Definition at line 99 of file numbers.h.
◆ cfInitCharProc
initialize an object of type coeff, return FALSE in case of success
Definition at line 95 of file numbers.h.
◆ n_IsZeroDivisor()
Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementation: should ONLY be used for debug stuff /tests.
Definition at line 171 of file numbers.cc.
172{
175 if (
ret || (c==0) || (r->is_field))
183}
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
◆ ndConvSingNFactoryN()
Definition at line 307 of file numbers.cc.
308{
310 WerrorS(
"no conversion to factory");
312}
void WerrorS(const char *s)
◆ ndGcd()
Definition at line 187 of file numbers.cc.
187{ return r->cfInit(1,r); }
◆ ndNormalize()
◆ ndQuotRem()
Definition at line 350 of file numbers.cc.
352{
353
355 {
358 }
359 else
360
361 {
366 return d;
367 }
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
◆ ndReadFd()
Definition at line 150 of file numbers.cc.
151{
152 Warn(
"ReadFd not implemented for %s (c=%d)",r->cfCoeffName(r),
getCoeffType(r));
154}
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
◆ nEati() [1/2]
divide by the first (leading) number and return it, i.e. make monic
does nothing (just returns a dummy one number) helper routine: read an int from a string (mod m), return a pointer to the rest
Definition at line 665 of file numbers.cc.
667{
668
669 if (((*
s) >=
'0') && ((*
s) <=
'9'))
670 {
672 do
673 {
677 }
678 while (((*
s) >=
'0') && ((*
s) <=
'9'));
679 if ((
m!=0) && (
ii>=(
unsigned)
m))
ii=
ii%
m;
681 }
const CanonicalForm int s
◆ nEati() [2/2]
Definition at line 685 of file numbers.cc.
687{
688
689 if (((*
s) >=
'0') && ((*
s) <=
'9'))
690 {
692 do
693 {
697 }
698 while (((*
s) >=
'0') && ((*
s) <=
'9'));
699 if ((
m!=0) && (
ii>=(
unsigned long)
m))
ii=
ii%(
unsigned long)
m;
701 }
◆ nEatLong()
extracts a long integer from s, returns the rest
Definition at line 706 of file numbers.cc.
708{
709 const char * start=
s;
710
711 while (*
s >=
'0' && *
s <=
'9')
s++;
713 {
715 }
716 else
717 {
722 }
◆ nFindCoeffByName()
find an existing coeff by its "CoeffName"
Definition at line 633 of file numbers.cc.
635{
637
639 {
643 }
644
645
648 {
652 }
The main handler for Singular numbers which are suitable for Singular polynomials.
VAR nFindCoeffByName_p nFindCoeffByName_Root
char *(* cfCoeffName)(const coeffs r)
default name of cf, should substitute cfCoeffWrite, cfCoeffString
◆ nRegister()
Definition at line 583 of file numbers.cc.
585{
587 {
590 {
595 }
596 else
597 {
601 }
602
605 }
606 else
607 {
608
610 return n;
611 }
STATIC_VAR n_coeffType nLastCoeffs
STATIC_VAR cfInitCharProc * nInitCharTable
VAR cfInitCharProc nInitCharTableDefault[]
BOOLEAN(* cfInitCharProc)(coeffs, void *)
initialize an object of type coeff, return FALSE in case of success
#define omReallocSize(addr, o_size, size)
◆ nRegisterCfByName()
◆ nDivBy0