20{
24
25#if PDEBUG > 0
27#endif
28
29 Shorter = 0;
30
32
34 poly a = &rp,
36
37
39 tneg = n_Neg__T(n_Copy__T(tm, r->cf), r->cf),
40 tb,
41 tc;
42
43
44 int shorter = 0;
45 DECLARE_LENGTH(
const unsigned long length = r->ExpL_Size);
46 DECLARE_ORDSGN(const long* ordsgn = r->ordsgn);
47
48 const unsigned long* m_e =
m->exp;
49 omBin bin = r->PolyBin;
50
51 if (
p ==
NULL)
goto Finish;
52
54
55 AllocTop:
57 SumTop:
58 p_MemSum__T(qm->exp, q->exp, m_e,
length);
59 p_MemAddAdjust__T(qm, r);
60
61 CmpTop:
62
64
67#ifdef HAVE_ZERODIVISORS
68 if (!n_IsZero__T(tb,r->cf)) {
69#endif
71 if (!n_Equal__T(tc, tb, r->cf))
72 {
73 shorter++;
74 tc = n_Sub__T(tc, tb, r->cf);
79 }
80 else
81 {
82 shorter += 2;
85 }
86#ifdef HAVE_ZERODIVISORS
87 }
88 else
89 {
90 shorter += 1;
91 }
92#endif
96
97 goto SumTop;
98
99
101#ifdef HAVE_ZERODIVISORS
102 tb = n_Mult__T(
pGetCoeff(q), tneg, r->cf);
103 if (!n_IsZero__T(tb,r->cf))
104 {
105#endif
108#ifdef HAVE_ZERODIVISORS
109 }
110 else
111 {
112 shorter++;
113 }
115#endif
118 {
120 goto Finish;
121 }
122
123 goto AllocTop;
124
125 Smaller:
128 if (
p ==
NULL)
goto Finish;
129 goto CmpTop;
130
131
132 Finish:
134 {
136 }
137 else
138 {
140 if (spNoether !=
NULL)
141 {
142 int ll = 0;
143 pNext(a) = r->p_Procs->pp_Mult_mm_Noether(q,
m, spNoether, ll, r);
144 shorter += ll;
145 }
146 else
147 {
148 pNext(a) = r->p_Procs->pp_Mult_mm(q,
m, r);
149#ifdef HAVE_ZERODIVISORS
151 {
153 }
154#endif
155 }
157 }
158
161 Shorter = shorter;
164}
static BOOLEAN Equal(number a, number b, const coeffs)
static bool Greater(mono_type m1, mono_type m2)
static BOOLEAN length(leftv result, leftv arg)
#define p_FreeBinAddr(p, r)
#define p_AllocBin(p, bin, r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define n_Delete__T(n, r)
static int pLength(poly a)
static poly p_LmFreeAndNext(poly p, ring)
static BOOLEAN rField_is_Domain(const ring r)