Go to the source code of this file.
◆ p_Add_q__T()
LINKAGE poly p_Add_q__T |
( |
poly |
p, |
|
|
poly |
q, |
|
|
int & |
Shorter, |
|
|
const ring |
r |
|
) |
| |
Definition at line 18 of file p_Add_q__T.cc.
19{
22#if PDEBUG > 0
24#endif
26
27 Shorter = 0;
28
29 number t, n1, n2;
30 int shorter = 0;
32 poly a = &rp;
33 DECLARE_LENGTH(
const unsigned long length = r->CmpL_Size);
34 DECLARE_ORDSGN(const long* ordsgn = r->ordsgn);
35
36 Top:
38
42 n_InpAdd__T(n1,n2,r->cf);
43 t = n1;
46
47 if (n_IsZero__T(t, r->cf))
48 {
49 shorter += 2;
52 }
53 else
54 {
55 shorter++;
59 }
62 goto Top;
63
68 goto Top;
69
70 Smaller:
74 goto Top;
75
76
77 Finish:
78 Shorter = shorter;
79
81#if PDEBUG > 0
83#endif
85}
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)
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)