19 {
return n_Copy(n,r->cf); }
25 {
return n_Mult(n1, n2, r->cf); }
28 {
return n_Add(n1, n2, r->cf); }
34 {
return n_Equal(n1, n2, r->cf); }
40 {
return n_Sub(n1, n2, r->cf); }
49 #define n_Copy_RingGeneral(n, r) n_Copy_FieldGeneral(n, r)
50 #define n_Delete_RingGeneral(n, r) n_Delete_FieldGeneral(n, r)
51 #define n_Mult_RingGeneral(n1, n2, r) n_Mult_FieldGeneral(n1, n2, r)
52 #define n_Add_RingGeneral(n1, n2, r) n_Add_FieldGeneral(n1, n2, r)
53 #define n_IsZero_RingGeneral(n, r) n_IsZero_FieldGeneral(n, r)
54 #define n_Equal_RingGeneral(n1, n2, r) n_Equal_FieldGeneral(n1, n2, r)
55 #define n_Neg_RingGeneral(n, r) n_Neg_FieldGeneral(n, r)
56 #define n_Sub_RingGeneral(n1, n2, r) n_Sub_FieldGeneral(n1, n2, r)
58 #define n_InpMult_RingGeneral(n1, n2, r) n_InpMult_FieldGeneral(n1, n2, r)
66 #define n_Copy_FieldZp(n, r) n
67 #define n_Delete_FieldZp(n, r) do {} while (0)
81 {
return npAddM(n1, n2, r->cf); }
93 {
return npSubM(n1, n2, r->cf); }
117 { n1=
npAddM(n1, n2, r->cf); }
120 #define DO_LFORCE_INLINE
141 {
return nlAdd(n1, n2, r->cf); }
153 {
return nlSub(n1, n2, r->cf); }
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
LINLINE number nlSub(number la, number li, const coeffs r)
static FORCE_INLINE void n_InpAdd_FieldQ(number &n1, number n2, const ring r)
static number npMultM(number a, number b, const coeffs r)
static FORCE_INLINE BOOLEAN n_IsZero_FieldQ(number n, const ring r)
static FORCE_INLINE number n_Mult_FieldQ(number n1, number n2, const ring r)
static FORCE_INLINE BOOLEAN n_Equal_FieldQ(number n1, number n2, const ring r)
static FORCE_INLINE void n_Delete_FieldGeneral(number *p, const ring r)
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
static FORCE_INLINE number n_Copy_FieldQ(number n, const ring r)
LINLINE void nlInpAdd(number &a, number b, const coeffs r)
#define npEqualM(A, B, r)
LINLINE number nlAdd(number la, number li, const coeffs r)
const CanonicalForm CFMap CFMap int &both_non_zero int n
static FORCE_INLINE number n_Sub_FieldZp(number n1, number n2, const ring r)
static FORCE_INLINE void n_InpMult_FieldGeneral(number &n1, number n2, const ring r)
static FORCE_INLINE void n_InpAdd(number &a, number b, const coeffs r)
addition of 'a' and 'b'; replacement of 'a' by the sum a+b
static number npNegM(number a, const coeffs r)
static number npSubM(number a, number b, const coeffs r)
static FORCE_INLINE void n_InpMult_FieldZp(number &n1, number n2, const ring r)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
LINLINE number nlNeg(number za, const coeffs r)
static FORCE_INLINE number n_Mult_FieldZp(number n1, number n2, const ring r)
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE number n_Mult_FieldGeneral(number n1, number n2, const ring r)
static FORCE_INLINE number n_Add_FieldQ(number n1, number n2, const ring r)
LINLINE number nlMult(number a, number b, const coeffs r)
static FORCE_INLINE number n_Neg_FieldQ(number n, const ring r)
static FORCE_INLINE number n_Copy_FieldGeneral(number n, const ring r)
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
LINLINE void nlInpMult(number &a, number b, const coeffs r)
static number npAddM(number a, number b, const coeffs r)
static FORCE_INLINE BOOLEAN n_Equal_FieldGeneral(number n1, number n2, const ring r)
static FORCE_INLINE void n_InpAdd_FieldZp(number &n1, number n2, const ring r)
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)
static FORCE_INLINE BOOLEAN n_IsZero_FieldZp(number n, const ring r)
LINLINE BOOLEAN nlEqual(number a, number b, const coeffs r)
static BOOLEAN rField_is_Q(const ring r)
LINLINE BOOLEAN nlIsZero(number za, const coeffs r)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static BOOLEAN rField_is_Ring(const ring r)
static FORCE_INLINE number n_Neg_FieldZp(number n, const ring r)
static FORCE_INLINE void n_InpAdd_FieldGeneral(number &n1, number n2, const ring r)
static BOOLEAN npIsZeroM(number a, const coeffs)
static FORCE_INLINE number n_Add_FieldZp(number n1, number n2, const ring r)
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
LINLINE void nlDelete(number *a, const coeffs r)
static FORCE_INLINE number n_Sub_FieldGeneral(number n1, number n2, const ring r)
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
static FORCE_INLINE BOOLEAN n_Equal_FieldZp(number n1, number n2, const ring r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE void n_InpAdd_RingGeneral(number &n1, number n2, const ring r)
static FORCE_INLINE number n_Sub_FieldQ(number n1, number n2, const ring r)
static FORCE_INLINE void n_Delete_FieldQ(number *n, const ring r)
LINLINE number nlCopy(number a, const coeffs r)
static FORCE_INLINE void n_InpMult_FieldQ(number &n1, number n2, const ring r)
static FORCE_INLINE BOOLEAN n_IsZero_FieldGeneral(number n, const ring r)
static FORCE_INLINE number n_Add_FieldGeneral(number n1, number n2, const ring r)
static FORCE_INLINE number n_Neg_FieldGeneral(number n, const ring r)