My Project
Loading...
Searching...
No Matches
Functions
pp_Mult_mm__T.cc File Reference

Go to the source code of this file.

Functions

LINKAGE poly pp_Mult_mm__T (poly p, const poly m, const ring ri)
 

Function Documentation

◆ pp_Mult_mm__T()

LINKAGE poly pp_Mult_mm__T ( poly  p,
const poly  m,
const ring  ri 
)

Definition at line 17 of file pp_Mult_mm__T.cc.

18{
19 p_Test(p, ri);
20 p_LmTest(m, ri);
21 if (p == NULL)
22 {
23 return NULL;
24 }
25 spolyrec rp;
26#ifdef HAVE_ZERODIVISORS
27 rp.next = NULL;
28#endif
29 poly q = &rp;
30 number ln = pGetCoeff(m);
31 omBin bin = ri->PolyBin;
32 DECLARE_LENGTH(const unsigned long length = ri->ExpL_Size);
33 const unsigned long* m_e = m->exp;
34 pAssume(!n_IsZero__T(ln,ri->cf));
35 pAssume1(p_GetComp(m, ri) == 0 || p_MaxComp(p, ri) == 0);
36 number tmp;
37
38 do
39 {
40 tmp = n_Mult__T(ln, pGetCoeff(p), ri->cf);
41#ifdef HAVE_ZERODIVISORS
42 if (! n_IsZero__T(tmp, ri->cf))
43 {
44#endif
45 p_AllocBin( pNext(q), bin, ri);
46 q = pNext(q);
47 pSetCoeff0(q, tmp);
48 p_MemSum__T(q->exp, p->exp, m_e, length);
49 p_MemAddAdjust__T(q, ri);
50#ifdef HAVE_ZERODIVISORS
51 }
52 else n_Delete__T(&tmp, ri->cf);
53#endif
54 p = pNext(p);
55 }
56 while (p != NULL);
57 pNext(q) = NULL;
58
59 p_Test(pNext(&rp), ri);
60 return pNext(&rp);
61}
int m
Definition: cfEzgcd.cc:128
int p
Definition: cfModGcd.cc:4078
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:257
#define p_GetComp(p, r)
Definition: monomials.h:64
poly next
Definition: monomials.h:24
#define pNext(p)
Definition: monomials.h:36
#define pAssume1(cond)
Definition: monomials.h:171
#define pSetCoeff0(p, n)
Definition: monomials.h:59
#define p_AllocBin(p, bin, r)
Definition: monomials.h:248
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:44
#define pAssume(cond)
Definition: monomials.h:90
#define NULL
Definition: omList.c:12
omBin_t * omBin
Definition: omStructs.h:12
#define n_Delete__T(n, r)
Definition: p_polys.cc:4841
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
Definition: p_polys.h:290
#define p_LmTest(p, r)
Definition: p_polys.h:160
#define p_Test(p, r)
Definition: p_polys.h:159