Loading...
Searching...
No Matches
number2.cc
Go to the documentation of this file.
#include "kernel/mod2.h" // general settings/macros
#include "reporter/reporter.h" // for Print, WerrorS
#include "coeffs/numbers.h" // nRegister, coeffs.h
#include "coeffs/rmodulon.h" // ZnmInfo
#include "coeffs/bigintmat.h" // bigintmat
#include "coeffs/longrat.h" // BIGINTs: nlMPZ
#include "polys/ext_fields/algext.h" // AlgExtInfo
#include "misc/prime.h" // IsPrime
#include "Singular/blackbox.h" // blackbox type
#include "Singular/ipshell.h" // IsPrime
#include "Singular/ipconv.h" // iiConvert etc.
#include "Singular/ipid.h" // for SModulFunctions, leftv
#include "Singular/number2.h"
char *crString(coeffs c)
{
if (c==NULL)
{
return omStrDup("oo");
}
return omStrDup(nCoeffName(c));
}
void crPrint(coeffs c)
{
char *s=crString(c);
PrintS(s);
omFree(s);
}
// -----------------------------------------------------------
// interpreter stuff for cring/coeffs
// -----------------------------------------------------------
BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b)
{
coeffs c1=(coeffs)a->Data();
unsigned long i2=(unsigned long)b->Data();
if (c1->type==n_Z)
{
if (i2==(unsigned long)IsPrime(i2))
{
#ifndef TEST_ZN_AS_ZP
res->data=(void *)nInitChar(n_Zp,(void*)i2);
#else
ZnmInfo info;
mpz_t modBase;
mpz_init_set_ui(modBase,i2);
info.base= modBase;
info.exp= 1;
res->data=(void *)nInitChar(n_Zn,&info);
mpz_clear(modBase);
#endif
}
else
{
ZnmInfo info;
mpz_t modBase;
mpz_init_set_ui(modBase,i2);
info.base= modBase;
info.exp= 1;
if (mpz_popcount((mpz_ptr)modBase)==1) // is a power of 2
{
i2=SI_LOG2(i2);
// is exponent <=2^(8*sizeof(unsigned long))
if (i2<(8*sizeof(unsigned long)))
{
mpz_clear(modBase);
res->data=(void *) nInitChar(n_Z2m,(void*)i2);
return FALSE;
}
else
{
mpz_set_ui(modBase,2);
info.exp=i2;
res->data=(void *) nInitChar(n_Znm,&info);
mpz_clear(modBase);
return FALSE;
}
}
res->data=(void *)nInitChar(n_Zn,&info);
mpz_clear(modBase);
}
return FALSE;
}
return TRUE;
}
BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b)
{
coeffs c1=(coeffs)a->Data();
number i2=(number)b->Data();
if (c1->type==n_Z)
{
ZnmInfo info;
mpz_t modBase;
nlMPZ(modBase,i2,coeffs_BIGINT);
info.base= (mpz_ptr)modBase;
info.exp= 1;
if (mpz_popcount(modBase)==1) // is a power of 2
{
// is exponent <=2^(8*sizeof(unsigned long))
mp_bitcnt_t l=mpz_scan1 (modBase,0);
if ((l>0) && (l<=8*sizeof(unsigned long)))
{
res->data=(void *) nInitChar(n_Z2m,(void*)(long)l);
}
else
{
mpz_set_ui(modBase,2);
info.exp= l;
res->data=(void *) nInitChar(n_Znm,&info);
}
mpz_clear(modBase);
return FALSE;
}
res->data=(void *)nInitChar(n_Zn,&info);
mpz_clear(modBase);
return FALSE;
}
return TRUE;
}
BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b)
{
coeffs a2=(coeffs)a->Data();
coeffs b2=(coeffs)b->Data();
res->data=(void*)(long)(a2==b2);
if (iiOp==NOTEQUAL) res->data=(char *)(!(long)res->data);
return FALSE;
}
BOOLEAN jjR2_CR(leftv res, leftv a) // ring ->cring
{
ring r=(ring)a->Data();
AlgExtInfo extParam;
extParam.r = r;
coeffs cf=nInitChar(n_transExt,&extParam);
res->data=(void*)cf;
return FALSE;
}
#ifdef SINGULAR_4_2
// -----------------------------------------------------------
// interpreter stuff for Number/number2
// -----------------------------------------------------------
BOOLEAN jjNUMBER2_POW(leftv res, leftv a, leftv b)
{
number2 a2=(number2)a->Data();
if (a2->cf==NULL) return TRUE;
number2 r=(number2)omAlloc0(sizeof(*r));
r->cf=a2->cf;
n_Power(a2->n,(int)(long)b->Data(),&(r->n),r->cf);
return FALSE;
}
BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b)
{
int op=iiOp;
// binary operations for number2
number2 a2=NULL;
number aa=NULL;
number2 b2=NULL;
number bb=NULL;
leftv an = (leftv)omAlloc0Bin(sleftv_bin);
leftv bn = (leftv)omAlloc0Bin(sleftv_bin);
int ai,bi;
int at=a->Typ();
int bt=b->Typ();
if ((ai=iiTestConvert(at,CNUMBER_CMD,dConvertTypes))!=0)
{
if ((bi=iiTestConvert(bt,CNUMBER_CMD,dConvertTypes))!=0)
{
iiConvert(at,CNUMBER_CMD,ai,a,an);
iiConvert(bt,CNUMBER_CMD,bi,b,bn);
a2=(number2)an->Data();
b2=(number2)bn->Data();
if (((a2!=NULL) && (b2!=NULL) && (a2->cf!=b2->cf))
|| (a2==NULL)
|| (b2==NULL))
{
an->CleanUp();
bn->CleanUp();
omFreeBin((ADDRESS)an, sleftv_bin);
omFreeBin((ADDRESS)bn, sleftv_bin);
WerrorS("Number not compatible");
return TRUE;
}
aa=a2->n;
bb=b2->n;
number2 r=(number2)omAlloc0(sizeof(*r));
r->cf=a2->cf;
if (r->cf==NULL) op=0; // force error
switch(op)
{
case '+': r->n=n_Add(aa,bb,r->cf);break;
case '-': r->n=n_Sub(aa,bb,r->cf);break;
case '*': r->n=n_Mult(aa,bb,r->cf);break;
case '/': r->n=n_Div(aa,bb,r->cf);break;
case '%': r->n=n_IntMod(aa,bb,r->cf);break;
default: Werror("unknown binary operation %s(%d)",Tok2Cmdname(op),op);
omFreeBinAddr(r);
an->CleanUp();
bn->CleanUp();
omFreeBin((ADDRESS)an, sleftv_bin);
omFreeBin((ADDRESS)bn, sleftv_bin);
return TRUE;
}
res->data=(void*)r;
r->cf->ref++;
return FALSE;
}
else
{
an->CleanUp();
omFreeBin((ADDRESS)an, sleftv_bin);
Werror("cannot convert second operand (%s) to Number",b->Name());
return TRUE;
}
}
else
{
Werror("cannot convert first operand (%s) to Number",a->Name());
return TRUE;
}
}
BOOLEAN jjNUMBER2_OP1(leftv res, leftv a)
{
int op=iiOp;
// unary operations for number2
number2 a2=(number2)a->Data();
number2 r=(number2)omAlloc(sizeof(*r));
r->cf=a2->cf;
if (a2->cf==NULL) op=0; // force error
switch(op)
{
case '-': r->n=n_Copy(a2->n,a2->cf);r->n=n_InpNeg(r->n,a2->cf);break;
default: Werror("unknown unary operation %s(%d)",Tok2Cmdname(op),op);
omFreeBinAddr(r);
return TRUE;
}
res->data=(void*)r;
r->cf->ref++;
return FALSE;
}
BOOLEAN jjPOLY2_POW(leftv res, leftv a, leftv b)
{
poly2 a2=(poly2)a->Data();
if (a2->cf==NULL) return TRUE;
poly2 r=(poly2)omAlloc0(sizeof(*r));
r->cf=a2->cf;
r->n=p_Power(p_Copy(a2->n,r->cf),(int)(long)b->Data(),r->cf);
return FALSE;
}
BOOLEAN jjPOLY2_OP2(leftv res, leftv a, leftv b)
{
int op=iiOp;
// binary operations for poly2
poly2 a2=NULL;
poly aa=NULL;
poly2 b2=NULL;
poly bb=NULL;
leftv an = (leftv)omAlloc0Bin(sleftv_bin);
leftv bn = (leftv)omAlloc0Bin(sleftv_bin);
int ai,bi;
int at=a->Typ();
int bt=b->Typ();
if ((ai=iiTestConvert(at,CPOLY_CMD,dConvertTypes))!=0)
{
if ((bi=iiTestConvert(bt,CPOLY_CMD,dConvertTypes))!=0)
{
iiConvert(at,CPOLY_CMD,ai,a,an);
iiConvert(bt,CPOLY_CMD,bi,b,bn);
a2=(poly2)an->Data();
b2=(poly2)bn->Data();
if (((a2!=NULL) && (b2!=NULL) && (a2->cf!=b2->cf))
|| (a2==NULL)
|| (b2==NULL))
{
an->CleanUp();
bn->CleanUp();
omFreeBin((ADDRESS)an, sleftv_bin);
omFreeBin((ADDRESS)bn, sleftv_bin);
WerrorS("Poly not compatible");
return TRUE;
}
aa=a2->n;
bb=b2->n;
poly2 r=(poly2)omAlloc0(sizeof(*r));
r->cf=a2->cf;
if (r->cf==NULL) op=0; // force error
switch(op)
{
case '+': r->n=p_Add_q(p_Copy(aa,r->cf),p_Copy(bb,r->cf),r->cf);break;
case '-': r->n=p_Sub(p_Copy(aa,r->cf),p_Copy(bb,r->cf),r->cf);break;
case '*': r->n=pp_Mult_qq(aa,bb,r->cf);break;
//case '/': r->n=n_Div(aa,bb,r->cf);break;
//case '%': r->n=n_IntMod(aa,bb,r->cf);break;
default: Werror("unknown binary operation %s(%d)",Tok2Cmdname(op),op);
omFreeBinAddr(r);
an->CleanUp();
bn->CleanUp();
omFreeBin((ADDRESS)an, sleftv_bin);
omFreeBin((ADDRESS)bn, sleftv_bin);
return TRUE;
}
res->data=(void*)r;
r->cf->ref++;
return FALSE;
}
else
{
an->CleanUp();
omFreeBin((ADDRESS)an, sleftv_bin);
Werror("cannot convert second operand (%s) to Poly",b->Name());
return TRUE;
}
}
else
{
Werror("cannot convert first operand (%s) to Poly",a->Name());
return TRUE;
}
}
BOOLEAN jjPOLY2_OP1(leftv res, leftv a)
{
int op=iiOp;
// unary operations for poly2
poly2 a2=(poly2)a->Data();
poly2 r=(poly2)omAlloc(sizeof(*r));
r->cf=a2->cf;
if (a2->cf==NULL) op=0; // force error
switch(op)
{
case '-': r->n=p_Copy(a2->n,a2->cf);r->n=p_Neg(r->n,a2->cf);break;
default: Werror("unknown unary operation %s(%d)",Tok2Cmdname(op),op);
omFreeBinAddr(r);
return TRUE;
}
res->data=(void*)r;
r->cf->ref++;
return FALSE;
}
BOOLEAN jjNUMBER2CR(leftv res, leftv a, leftv b)
{
number2 r=(number2)omAlloc(sizeof(*r));
r->cf=(coeffs)b->CopyD();
BOOLEAN bo=FALSE;
switch(a->Typ())
{
case INT_CMD:
r->n=n_Init((long)a->Data(),r->cf); break;
case BIGINT_CMD:
{
nMapFunc nMap=n_SetMap(coeffs_BIGINT,r->cf);
r->n=nMap((number)a->Data(),coeffs_BIGINT,r->cf); break;
}
case NUMBER_CMD:
{
nMapFunc nMap=n_SetMap(currRing->cf,r->cf);
if (nMap!=NULL)
r->n=nMap((number)a->Data(),currRing->cf,r->cf);
else
bo=TRUE;
break;
}
case CNUMBER_CMD:
{
number2 a2=(number2)a->Data();
if (a2->cf==NULL) bo=TRUE;
else
{
nMapFunc nMap=n_SetMap(a2->cf,r->cf);
if (nMap!=NULL)
r->n=nMap(a2->n,a2->cf,r->cf);
else
bo=TRUE;
}
break;
}
default: bo=TRUE; break;
}
if (bo)
{
Werror("no conversion to Number from %s",Tok2Cmdname(a->Typ()));
omFreeSize(r,sizeof(*r));
}
else
res->data=(void*)r;
return bo;
}
BOOLEAN jjN2_CR(leftv res, leftv a) // number2 ->cring
{
number2 n=(number2)a->Data();
n->cf->ref++;
res->data=(void*)n->cf;
return FALSE;
}
BOOLEAN jjP2_R(leftv res, leftv a) // poly2 ->ring
{
poly2 n=(poly2)a->Data();
n->cf->ref++;
res->data=(void*)n->cf;
return FALSE;
}
BOOLEAN jjCM_CR(leftv res, leftv a) // cmatrix ->cring
{
bigintmat *b=(bigintmat*)a->Data();
coeffs cf=b->basecoeffs();
if (cf!=NULL)
{
cf->ref++;
}
res->data=(void*)cf;
return FALSE;
}
BOOLEAN jjCMATRIX_3(leftv res, leftv r, leftv c,leftv cf)
{
bigintmat *b=new bigintmat((int)(long)r->Data(),
(int)(long)c->Data(),
(coeffs)cf->Data());
res->data=(char*)b;
return FALSE;
}
BOOLEAN jjN2_N(leftv res, leftv a) // number2 ->number
{
number2 n2=(number2)a->Data();
BOOLEAN bo=TRUE;
if (currRing!=NULL)
{
nMapFunc nMap=n_SetMap(n2->cf,currRing->cf);
if (nMap!=NULL)
{
res->data=(void*)nMap(n2->n,n2->cf,currRing->cf);
bo=FALSE;
}
}
return bo;
}
// -----------------------------------------------------------
// operations with Number/number2
// -----------------------------------------------------------
number2 n2Copy(const number2 d)
{
number2 r=NULL;
if ((d!=NULL)&&(d->cf!=NULL))
{
r=(number2)omAlloc(sizeof(*r));
d->cf->ref++;
r->cf=d->cf;
if (d->cf!=NULL)
r->n=n_Copy(d->n,d->cf);
else
r->n=NULL;
}
return r;
}
void n2Delete(number2 &d)
{
if (d!=NULL)
{
if (d->cf!=NULL)
{
n_Delete(&d->n,d->cf);
nKillChar(d->cf);
}
omFreeSize(d,sizeof(*d));
d=NULL;
}
}
char *n2String(number2 d, BOOLEAN typed)
{
StringSetS("");
if ((d!=NULL) && (d->cf!=NULL))
{
if (typed) StringAppendS("Number(");
n_Write(d->n,d->cf);
if (typed) StringAppendS(")");
}
else StringAppendS("oo");
return StringEndS();
}
void n2Print(number2 d)
{
char *s=n2String(d,FALSE);
PrintS(s);
omFree(s);
}
// -----------------------------------------------------------
// operations with Poly/poly2
// -----------------------------------------------------------
poly2 p2Copy(const poly2 d)
{
poly2 r=NULL;
if ((d!=NULL)&&(d->cf!=NULL))
{
r=(poly2)omAlloc(sizeof(*r));
d->cf->ref++;
r->cf=d->cf;
if (d->cf!=NULL)
r->n=p_Copy(d->n,d->cf);
else
r->n=NULL;
}
return r;
}
void p2Delete(poly2 &d)
{
if (d!=NULL)
{
if (d->cf!=NULL)
{
p_Delete(&d->n,d->cf);
rKill(d->cf);
}
omFreeSize(d,sizeof(*d));
d=NULL;
}
}
char *p2String(poly2 d, BOOLEAN typed)
{
StringSetS("");
if ((d!=NULL) && (d->cf!=NULL))
{
if (typed) StringAppendS("Poly(");
p_Write0(d->n,d->cf);
if (typed) StringAppendS(")");
}
else StringAppendS("oo");
return StringEndS();
}
void p2Print(poly2 d)
{
char *s=p2String(d,FALSE);
PrintS(s);
omFree(s);
}
// ---------------------------------------------------------------------
BOOLEAN jjBIM2_CR(leftv res, leftv a) // bigintmat ->cring
{
bigintmat *b=(bigintmat*)a->Data();
coeffs cf=b->basecoeffs();
if (cf==NULL) return TRUE;
cf->ref++;
res->data=(void*)cf;
return FALSE;
}
#endif
algext.h
AlgExtInfo::r
ring r
Definition algext.h:37
AlgExtInfo
struct for passing initialization parameters to naInitChar
Definition algext.h:37
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
ADDRESS
void * ADDRESS
Definition auxiliary.h:120
bigintmat.h
blackbox.h
l
int l
Definition cfEzgcd.cc:100
cf
CanonicalForm cf
Definition cfModGcd.cc:4091
b
CanonicalForm b
Definition cfModGcd.cc:4111
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
sleftv::Typ
int Typ()
Definition subexpr.cc:1048
sleftv::Data
void * Data()
Definition subexpr.cc:1192
sleftv::Name
const char * Name()
Definition subexpr.h:120
sleftv::CleanUp
void CleanUp(ring r=currRing)
Definition subexpr.cc:351
n_Mult
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
Definition coeffs.h:639
n_Copy
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition coeffs.h:457
n_Add
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
Definition coeffs.h:653
n_Znm
@ n_Znm
only used if HAVE_RINGS is defined
Definition coeffs.h:45
n_Zn
@ n_Zn
only used if HAVE_RINGS is defined
Definition coeffs.h:44
n_Z2m
@ n_Z2m
only used if HAVE_RINGS is defined
Definition coeffs.h:46
n_Zp
@ n_Zp
\F{p < 2^31}
Definition coeffs.h:29
n_transExt
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
Definition coeffs.h:38
n_Z
@ n_Z
only used if HAVE_RINGS is defined
Definition coeffs.h:43
n_SetMap
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition coeffs.h:703
n_InpNeg
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition coeffs.h:560
n_Power
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
Definition coeffs.h:635
n_Div
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...
Definition coeffs.h:618
nInitChar
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition numbers.cc:412
n_Sub
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
Definition coeffs.h:658
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
nCoeffName
static FORCE_INLINE char * nCoeffName(const coeffs cf)
Definition coeffs.h:962
n_Write
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition coeffs.h:594
n_Init
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition coeffs.h:541
n_IntMod
static FORCE_INLINE number n_IntMod(number a, number b, const coeffs r)
for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,...
Definition coeffs.h:631
nMapFunc
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition coeffs.h:80
nKillChar
void nKillChar(coeffs r)
undo all initialisations
Definition numbers.cc:563
s
const CanonicalForm int s
Definition facAbsFact.cc:51
res
CanonicalForm res
Definition facAbsFact.cc:60
WerrorS
void WerrorS(const char *s)
Definition feFopen.cc:24
iiTestConvert
int iiTestConvert(int inputType, int outputType)
Definition gentable.cc:298
Tok2Cmdname
const char * Tok2Cmdname(int tok)
Definition gentable.cc:137
NOTEQUAL
@ NOTEQUAL
Definition grammar.cc:273
NUMBER_CMD
@ NUMBER_CMD
Definition grammar.cc:289
iiOp
VAR int iiOp
Definition iparith.cc:219
iiConvert
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
Definition ipconv.cc:450
ipconv.h
dConvertTypes
const struct sConvertTypes dConvertTypes[]
Definition table.h:1321
ipid.h
sleftv_bin
EXTERN_VAR omBin sleftv_bin
Definition ipid.h:145
rKill
void rKill(ring r)
Definition ipshell.cc:6181
ipshell.h
info
#define info
Definition libparse.cc:1256
nlMPZ
void nlMPZ(mpz_t m, number &n, const coeffs r)
get numerator as mpz_t
Definition longrat.cc:2790
longrat.h
mod2.h
coeffs
The main handler for Singular numbers which are suitable for Singular polynomials.
crString
char * crString(coeffs c)
Definition number2.cc:17
jjCRING_Zp
BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b)
Definition number2.cc:35
jjEQUAL_CR
BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b)
Definition number2.cc:123
crPrint
void crPrint(coeffs c)
Definition number2.cc:25
jjCRING_Zm
BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b)
Definition number2.cc:88
jjR2_CR
BOOLEAN jjR2_CR(leftv res, leftv a)
Definition number2.cc:132
number2.h
numbers.h
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259
omFreeBinAddr
#define omFreeBinAddr(addr)
Definition omAllocDecl.h:258
NULL
#define NULL
Definition omList.c:12
p_Power
poly p_Power(poly p, int i, const ring r)
Definition p_polys.cc:2245
p_Sub
poly p_Sub(poly p1, poly p2, const ring r)
Definition p_polys.cc:1994
p_Neg
static poly p_Neg(poly p, const ring r)
Definition p_polys.h:1114
p_Add_q
static poly p_Add_q(poly p, poly q, const ring r)
Definition p_polys.h:938
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
p_Write0
void p_Write0(poly p, ring lmRing, ring tailRing)
Definition polys0.cc:332
pp_Mult_qq
static poly pp_Mult_qq(poly p, poly q, const ring r)
Definition p_polys.h:1167
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition p_polys.h:848
coeffs_BIGINT
VAR coeffs coeffs_BIGINT
Definition polys.cc:14
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
IsPrime
int IsPrime(int p)
Definition prime.cc:61
prime.h
StringSetS
void StringSetS(const char *st)
Definition reporter.cc:128
StringAppendS
void StringAppendS(const char *st)
Definition reporter.cc:107
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
StringEndS
char * StringEndS()
Definition reporter.cc:151
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189
reporter.h
rmodulon.h
ZnmInfo
Definition rmodulon.h:17
SI_LOG2
static int SI_LOG2(int v)
Definition si_log2.h:6
leftv
sleftv * leftv
Definition structs.h:53
BIGINT_CMD
@ BIGINT_CMD
Definition tok.h:38
CNUMBER_CMD
@ CNUMBER_CMD
Definition tok.h:47
CPOLY_CMD
@ CPOLY_CMD
Definition tok.h:48
INT_CMD
@ INT_CMD
Definition tok.h:96