36#define pNext(p) ((p)->next)
37#define pIter(p) (void)((p) = (p)->next)
50#define p_GetCoeff(p,r) pGetCoeff(p)
59#define pSetCoeff0(p,n) (p)->coef=(n)
60#define p_SetCoeff0(p,n,r) pSetCoeff0(p,n)
63#define __p_GetComp(p, r) (p)->exp[r->pCompIndex]
64#define p_GetComp(p, r) ((long) (r->pCompIndex >= 0 ? __p_GetComp(p, r) : 0))
78#define pAssumeReturn(cond) \
83 dPolyReportError(NULL, NULL, "pAssume violation of: %s", \
90#define pAssume(cond) \
95 dPolyReportError(NULL, NULL, "pAssume violation of: %s", \
101#define _pPolyAssumeReturn(cond, p, r) \
106 dPolyReportError(p, r, "pPolyAssume violation of: %s", \
113#define _pPolyAssume(cond,p,r) \
118 dPolyReportError(p, r, "pPolyAssume violation of: %s", \
124#define _pPolyAssumeReturnMsg(cond, msg, p, r) \
129 dPolyReportError(p, r, "%s ", msg); \
135#define pPolyAssume(cond) _pPolyAssume(cond, p, r)
136#define pPolyAssumeReturn(cond) _pPolyAssumeReturn(cond, p, r)
137#define pPolyAssumeReturnMsg(cond, msg) _pPolyAssumeReturnMsg(cond, msg, p, r)
139#define pFalseReturn(cond) do {if (! (cond)) return FALSE;} while (0)
140#if (OM_TRACK > 2) && defined(OM_TRACK_CUSTOM)
141#define p_SetRingOfLm(p, r) omSetCustomOfAddr(p, r)
144#define p_SetRingOfLm(p, r) do {} while (0)
149#define pFalseReturn(cond) do {} while (0)
150#define pAssume(cond) do {} while (0)
151#define pPolyAssume(cond) do {} while (0)
152#define _pPolyAssume(cond, p,r) do {} while (0)
153#define pAssumeReturn(cond) do {} while (0)
154#define pPolyAssumeReturn(cond) do {} while (0)
155#define _pPolyAssumeReturn(cond,p,r) do {} while (0)
156#define p_SetRingOfLm(p, r) do {} while (0)
161#define pAssume1 pAssume
162#define pPolyAssume1 pPolyAssume
163#define _pPolyAssume1 _pPolyAssume
164#define pAssumeReturn1 pAssumeReturn
165#define pPolyAssumeReturn1 pPolyAssumeReturn
166#define _pPolyAssumeReturn1 _pPolyAssumeReturn
167#define p_LmCheckPolyRing1 p_LmCheckPolyRing
168#define p_CheckRing1 p_CheckRing
169#define pIfThen1 pIfThen
171#define pAssume1(cond) do {} while (0)
172#define pPolyAssume1(cond) do {} while (0)
173#define _pPolyAssume1(cond,p,r) do {} while (0)
174#define pAssumeReturn1(cond) do {} while (0)
175#define pPolyAssumeReturn1(cond) do {} while (0)
176#define _pPolyAssumeReturn1(cond,p,r)do {} while (0)
177#define p_LmCheckPolyRing1(p,r) do {} while (0)
178#define p_CheckRing1(r) do {} while (0)
179#define pIfThen1(cond, check) do {} while (0)
183#define pAssume2 pAssume
184#define pPolyAssume2 pPolyAssume
185#define _pPolyAssume2 _pPolyAssume
186#define pAssumeReturn2 pAssumeReturn
187#define pPolyAssumeReturn2 pPolyAssumeReturn
188#define _pPolyAssumeReturn2 _pPolyAssumeReturn
189#define p_LmCheckPolyRing2 p_LmCheckPolyRing
190#define p_CheckRing2 p_CheckRing
191#define pIfThen2 pIfThen
193#define pAssume2(cond) do {} while (0)
194#define pPolyAssume2(cond) do {} while (0)
195#define _pPolyAssume2(cond,p,r) do {} while (0)
196#define pAssumeReturn2(cond) do {} while (0)
197#define pPolyAssumeReturn2(cond) do {} while (0)
198#define _pPolyAssumeReturn2(cond,p,r)do {} while (0)
199#define p_LmCheckPolyRing2(p,r) do {} while (0)
200#define p_CheckRing2(r) do {} while (0)
201#define pIfThen2(cond, check) do {} while (0)
210#define p_AllocBin(p, bin, r) \
213 omTypeAllocBin(poly, p, bin); \
214 p_SetRingOfLm(p, r); \
217#define p_FreeBinAddr(p, r) p_LmFree(p, r)
219#define p_AllocBin(p, bin, r) omTypeAllocBin(poly, p, bin)
220#define p_FreeBinAddr(p, r) omFreeBinAddr(p)
233#define POLYSIZE (sizeof(poly) + sizeof(number))
234#define POLYSIZEW (POLYSIZE / sizeof(long))
236#define POLY_NEGWEIGHT_OFFSET (((long)0x80000000) << 32)
238#define POLY_NEGWEIGHT_OFFSET ((long)0x80000000)
248#define p_AllocBin(p, bin, r) \
251 omTypeAllocBin(poly, p, bin); \
252 p_SetRingOfLm(p, r); \
255#define p_FreeBinAddr(p, r) p_LmFree(p, r)
257#define p_AllocBin(p, bin, r) omTypeAllocBin(poly, p, bin)
258#define p_FreeBinAddr(p, r) omFreeBinAddr(p)
266#define rRing_has_Comp(r) (r->pCompIndex >= 0)
Coefficient rings, fields and other domains suitable for Singular polynomials.
BOOLEAN dPolyReportError(poly p, ring r, const char *fmt,...)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy