Macros | Functions
p_Numbers.h File Reference
#include <misc/auxiliary.h>
#include <coeffs/coeffs.h>
#include <coeffs/numbers.h>
#include <polys/monomials/ring.h>
#include <coeffs/modulop.h>
#include <coeffs/longrat.cc>

Go to the source code of this file.

Macros

#define n_Copy_RingGeneral(n, r)   n_Copy_FieldGeneral(n, r)
 
#define n_Delete_RingGeneral(n, r)   n_Delete_FieldGeneral(n, r)
 
#define n_Mult_RingGeneral(n1, n2, r)   n_Mult_FieldGeneral(n1, n2, r)
 
#define n_Add_RingGeneral(n1, n2, r)   n_Add_FieldGeneral(n1, n2, r)
 
#define n_IsZero_RingGeneral(n, r)   n_IsZero_FieldGeneral(n, r)
 
#define n_Equal_RingGeneral(n1, n2, r)   n_Equal_FieldGeneral(n1, n2, r)
 
#define n_Neg_RingGeneral(n, r)   n_Neg_FieldGeneral(n, r)
 
#define n_Sub_RingGeneral(n1, n2, r)   n_Sub_FieldGeneral(n1, n2, r)
 
#define n_InpMult_RingGeneral(n1, n2, r)   n_InpMult_FieldGeneral(n1, n2, r)
 
#define n_Copy_FieldZp(n, r)   n
 
#define n_Delete_FieldZp(n, r)   do {} while (0)
 
#define DO_LFORCE_INLINE
 

Functions

static FORCE_INLINE number n_Copy_FieldGeneral (number n, const coeffs r)
 
static FORCE_INLINE void n_Delete_FieldGeneral (number *p, const coeffs r)
 
static FORCE_INLINE number n_Mult_FieldGeneral (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Add_FieldGeneral (number n1, number n2, const coeffs r)
 
static FORCE_INLINE BOOLEAN n_IsZero_FieldGeneral (number n, const coeffs r)
 
static FORCE_INLINE BOOLEAN n_Equal_FieldGeneral (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Neg_FieldGeneral (number n, const coeffs r)
 
static FORCE_INLINE number n_Sub_FieldGeneral (number n1, number n2, const coeffs r)
 
static FORCE_INLINE void n_InpMult_FieldGeneral (number &n1, number n2, const coeffs r)
 
static FORCE_INLINE void n_InpAdd_FieldGeneral (number &n1, number n2, const coeffs r)
 
static FORCE_INLINE void n_InpAdd_RingGeneral (number &n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Mult_FieldZp (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Add_FieldZp (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Sub_FieldZp (number n1, number n2, const coeffs r)
 
static FORCE_INLINE BOOLEAN n_IsZero_FieldZp (number n, const coeffs r)
 
static FORCE_INLINE BOOLEAN n_Equal_FieldZp (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Neg_FieldZp (number n, const coeffs r)
 
static FORCE_INLINE void n_InpMult_FieldZp (number &n1, number n2, const coeffs r)
 
static FORCE_INLINE void n_InpAdd_FieldZp (number &n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Copy_FieldQ (number n, const coeffs r)
 
static FORCE_INLINE void n_Delete_FieldQ (number *n, const coeffs r)
 
static FORCE_INLINE number n_Mult_FieldQ (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Add_FieldQ (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Sub_FieldQ (number n1, number n2, const coeffs r)
 
static FORCE_INLINE BOOLEAN n_IsZero_FieldQ (number n, const coeffs r)
 
static FORCE_INLINE BOOLEAN n_Equal_FieldQ (number n1, number n2, const coeffs r)
 
static FORCE_INLINE number n_Neg_FieldQ (number n, const coeffs r)
 
static FORCE_INLINE void n_InpMult_FieldQ (number &n1, number n2, const coeffs r)
 
static FORCE_INLINE void n_InpAdd_FieldQ (number &n1, number n2, const coeffs r)
 

Macro Definition Documentation

§ DO_LFORCE_INLINE

#define DO_LFORCE_INLINE

Definition at line 120 of file p_Numbers.h.

§ n_Add_RingGeneral

#define n_Add_RingGeneral (   n1,
  n2,
  r 
)    n_Add_FieldGeneral(n1, n2, r)

Definition at line 52 of file p_Numbers.h.

§ n_Copy_FieldZp

#define n_Copy_FieldZp (   n,
  r 
)    n

Definition at line 66 of file p_Numbers.h.

§ n_Copy_RingGeneral

#define n_Copy_RingGeneral (   n,
  r 
)    n_Copy_FieldGeneral(n, r)

Definition at line 49 of file p_Numbers.h.

§ n_Delete_FieldZp

#define n_Delete_FieldZp (   n,
  r 
)    do {} while (0)

Definition at line 67 of file p_Numbers.h.

§ n_Delete_RingGeneral

#define n_Delete_RingGeneral (   n,
  r 
)    n_Delete_FieldGeneral(n, r)

Definition at line 50 of file p_Numbers.h.

§ n_Equal_RingGeneral

#define n_Equal_RingGeneral (   n1,
  n2,
  r 
)    n_Equal_FieldGeneral(n1, n2, r)

Definition at line 54 of file p_Numbers.h.

§ n_InpMult_RingGeneral

#define n_InpMult_RingGeneral (   n1,
  n2,
  r 
)    n_InpMult_FieldGeneral(n1, n2, r)

Definition at line 58 of file p_Numbers.h.

§ n_IsZero_RingGeneral

#define n_IsZero_RingGeneral (   n,
  r 
)    n_IsZero_FieldGeneral(n, r)

Definition at line 53 of file p_Numbers.h.

§ n_Mult_RingGeneral

#define n_Mult_RingGeneral (   n1,
  n2,
  r 
)    n_Mult_FieldGeneral(n1, n2, r)

Definition at line 51 of file p_Numbers.h.

§ n_Neg_RingGeneral

#define n_Neg_RingGeneral (   n,
  r 
)    n_Neg_FieldGeneral(n, r)

Definition at line 55 of file p_Numbers.h.

§ n_Sub_RingGeneral

#define n_Sub_RingGeneral (   n1,
  n2,
  r 
)    n_Sub_FieldGeneral(n1, n2, r)

Definition at line 56 of file p_Numbers.h.

Function Documentation

§ n_Add_FieldGeneral()

static FORCE_INLINE number n_Add_FieldGeneral ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 27 of file p_Numbers.h.

28 { return n_Add(n1, n2, r); }
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of &#39;a&#39; and &#39;b&#39;, i.e., a+b
Definition: coeffs.h:660

§ n_Add_FieldQ()

static FORCE_INLINE number n_Add_FieldQ ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 140 of file p_Numbers.h.

141 { return nlAdd(n1, n2, r); }
LINLINE number nlAdd(number la, number li, const coeffs r)
Definition: longrat.cc:2519

§ n_Add_FieldZp()

static FORCE_INLINE number n_Add_FieldZp ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 80 of file p_Numbers.h.

81 { return npAddM(n1, n2, r); }
static number npAddM(number a, number b, const coeffs r)
Definition: modulop.h:77

§ n_Copy_FieldGeneral()

static FORCE_INLINE number n_Copy_FieldGeneral ( number  n,
const coeffs  r 
)
static

Definition at line 18 of file p_Numbers.h.

19 { return n_Copy(n,r); }
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of &#39;n&#39;
Definition: coeffs.h:455

§ n_Copy_FieldQ()

static FORCE_INLINE number n_Copy_FieldQ ( number  n,
const coeffs  r 
)
static

Definition at line 123 of file p_Numbers.h.

124 { STATISTIC(n_Copy); return nlCopy(n, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of &#39;n&#39;
Definition: coeffs.h:455
LINLINE number nlCopy(number a, const coeffs r)
Definition: longrat.cc:2471

§ n_Delete_FieldGeneral()

static FORCE_INLINE void n_Delete_FieldGeneral ( number *  p,
const coeffs  r 
)
static

Definition at line 21 of file p_Numbers.h.

22 { n_Delete(p,r); }
return P p
Definition: myNF.cc:203
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:459

§ n_Delete_FieldQ()

static FORCE_INLINE void n_Delete_FieldQ ( number *  n,
const coeffs  r 
)
static

Definition at line 126 of file p_Numbers.h.

127 { STATISTIC(n_Delete); nlDelete(n,r); }
#define STATISTIC(f)
Definition: numstats.h:16
LINLINE void nlDelete(number *a, const coeffs r)
Definition: longrat.cc:2484
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:459

§ n_Equal_FieldGeneral()

static FORCE_INLINE BOOLEAN n_Equal_FieldGeneral ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 33 of file p_Numbers.h.

34 { return n_Equal(n1, n2, r); }
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff &#39;a&#39; and &#39;b&#39; represent the same number; they may have different representations.
Definition: coeffs.h:464

§ n_Equal_FieldQ()

static FORCE_INLINE BOOLEAN n_Equal_FieldQ ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 159 of file p_Numbers.h.

160 { STATISTIC(n_Equal); return nlEqual(n1, n2, r); }
#define STATISTIC(f)
Definition: numstats.h:16
LINLINE BOOLEAN nlEqual(number a, number b, const coeffs r)
Definition: longrat.cc:2415
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff &#39;a&#39; and &#39;b&#39; represent the same number; they may have different representations.
Definition: coeffs.h:464

§ n_Equal_FieldZp()

static FORCE_INLINE BOOLEAN n_Equal_FieldZp ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 99 of file p_Numbers.h.

100 { STATISTIC(n_Equal); return npEqualM(n1, n2, r); }
#define STATISTIC(f)
Definition: numstats.h:16
#define npEqualM(A, B, r)
Definition: modulop.h:132
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff &#39;a&#39; and &#39;b&#39; represent the same number; they may have different representations.
Definition: coeffs.h:464

§ n_InpAdd_FieldGeneral()

static FORCE_INLINE void n_InpAdd_FieldGeneral ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 45 of file p_Numbers.h.

46 { n_InpAdd(n1, n2, r); }
static FORCE_INLINE void n_InpAdd(number &a, number b, const coeffs r)
addition of &#39;a&#39; and &#39;b&#39;; replacement of &#39;a&#39; by the sum a+b
Definition: coeffs.h:650

§ n_InpAdd_FieldQ()

static FORCE_INLINE void n_InpAdd_FieldQ ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 175 of file p_Numbers.h.

176 { nlInpAdd(n1, n2, r); }
LINLINE void nlInpAdd(number &a, number b, const coeffs r)
Definition: longrat.cc:2537

§ n_InpAdd_FieldZp()

static FORCE_INLINE void n_InpAdd_FieldZp ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 116 of file p_Numbers.h.

117 { n1=npAddM(n1, n2, r); }
static number npAddM(number a, number b, const coeffs r)
Definition: modulop.h:77

§ n_InpAdd_RingGeneral()

static FORCE_INLINE void n_InpAdd_RingGeneral ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 60 of file p_Numbers.h.

61 { assume(nCoeff_is_Ring(r)); n_InpAdd(n1, n2, r); }
static FORCE_INLINE void n_InpAdd(number &a, number b, const coeffs r)
addition of &#39;a&#39; and &#39;b&#39;; replacement of &#39;a&#39; by the sum a+b
Definition: coeffs.h:650
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition: coeffs.h:762
#define assume(x)
Definition: mod2.h:403

§ n_InpMult_FieldGeneral()

static FORCE_INLINE void n_InpMult_FieldGeneral ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 42 of file p_Numbers.h.

43 { n_InpMult(n1, n2, r); }
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of &#39;a&#39; and &#39;b&#39;; replacement of &#39;a&#39; by the product a*b
Definition: coeffs.h:645

§ n_InpMult_FieldQ()

static FORCE_INLINE void n_InpMult_FieldQ ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 165 of file p_Numbers.h.

166 { STATISTIC(n_InpMult); nlInpMult(n1, n2, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of &#39;a&#39; and &#39;b&#39;; replacement of &#39;a&#39; by the product a*b
Definition: coeffs.h:645
LINLINE void nlInpMult(number &a, number b, const coeffs r)
Definition: longrat.cc:2603

§ n_InpMult_FieldZp()

static FORCE_INLINE void n_InpMult_FieldZp ( number &  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 105 of file p_Numbers.h.

106 { STATISTIC(n_InpMult); n1=npMultM(n1, n2, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static number npMultM(number a, number b, const coeffs r)
Definition: modulop.h:49
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of &#39;a&#39; and &#39;b&#39;; replacement of &#39;a&#39; by the product a*b
Definition: coeffs.h:645

§ n_IsZero_FieldGeneral()

static FORCE_INLINE BOOLEAN n_IsZero_FieldGeneral ( number  n,
const coeffs  r 
)
static

Definition at line 30 of file p_Numbers.h.

31 { return n_IsZero(n, r); }
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff &#39;n&#39; represents the zero element.
Definition: coeffs.h:468

§ n_IsZero_FieldQ()

static FORCE_INLINE BOOLEAN n_IsZero_FieldQ ( number  n,
const coeffs  r 
)
static

Definition at line 156 of file p_Numbers.h.

157 { STATISTIC(n_IsZero); return nlIsZero(n, r); }
#define STATISTIC(f)
Definition: numstats.h:16
LINLINE BOOLEAN nlIsZero(number za, const coeffs r)
Definition: longrat.cc:2451
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff &#39;n&#39; represents the zero element.
Definition: coeffs.h:468

§ n_IsZero_FieldZp()

static FORCE_INLINE BOOLEAN n_IsZero_FieldZp ( number  n,
const coeffs  r 
)
static

Definition at line 96 of file p_Numbers.h.

97 { STATISTIC(n_IsZero); return npIsZeroM(n, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff &#39;n&#39; represents the zero element.
Definition: coeffs.h:468
static BOOLEAN npIsZeroM(number a, const coeffs)
Definition: modulop.h:116

§ n_Mult_FieldGeneral()

static FORCE_INLINE number n_Mult_FieldGeneral ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 24 of file p_Numbers.h.

25 { return n_Mult(n1, n2, r); }
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of &#39;a&#39; and &#39;b&#39;, i.e., a*b
Definition: coeffs.h:640

§ n_Mult_FieldQ()

static FORCE_INLINE number n_Mult_FieldQ ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 129 of file p_Numbers.h.

130 { STATISTIC(n_Mult); return nlMult(n1,n2, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of &#39;a&#39; and &#39;b&#39;, i.e., a*b
Definition: coeffs.h:640
LINLINE number nlMult(number a, number b, const coeffs r)
Definition: longrat.cc:2555

§ n_Mult_FieldZp()

static FORCE_INLINE number n_Mult_FieldZp ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 69 of file p_Numbers.h.

70 { STATISTIC(n_Mult); return npMultM(n1, n2, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static number npMultM(number a, number b, const coeffs r)
Definition: modulop.h:49
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of &#39;a&#39; and &#39;b&#39;, i.e., a*b
Definition: coeffs.h:640

§ n_Neg_FieldGeneral()

static FORCE_INLINE number n_Neg_FieldGeneral ( number  n,
const coeffs  r 
)
static

Definition at line 36 of file p_Numbers.h.

37 { return n_InpNeg(n, 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)
Definition: coeffs.h:561

§ n_Neg_FieldQ()

static FORCE_INLINE number n_Neg_FieldQ ( number  n,
const coeffs  r 
)
static

Definition at line 162 of file p_Numbers.h.

163 { STATISTIC(n_InpNeg); return nlNeg(n, r); }
#define STATISTIC(f)
Definition: numstats.h:16
LINLINE number nlNeg(number za, const coeffs r)
Definition: longrat.cc:2500
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)
Definition: coeffs.h:561

§ n_Neg_FieldZp()

static FORCE_INLINE number n_Neg_FieldZp ( number  n,
const coeffs  r 
)
static

Definition at line 102 of file p_Numbers.h.

103 { STATISTIC(n_InpNeg); return npNegM(n, r); }
#define STATISTIC(f)
Definition: numstats.h:16
static number npNegM(number a, const coeffs r)
Definition: modulop.h:111
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)
Definition: coeffs.h:561

§ n_Sub_FieldGeneral()

static FORCE_INLINE number n_Sub_FieldGeneral ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 39 of file p_Numbers.h.

40 { return n_Sub(n1, n2, r); }
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of &#39;a&#39; and &#39;b&#39;, i.e., a-b
Definition: coeffs.h:673

§ n_Sub_FieldQ()

static FORCE_INLINE number n_Sub_FieldQ ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 152 of file p_Numbers.h.

153 { return nlSub(n1, n2, r); }
LINLINE number nlSub(number la, number li, const coeffs r)
Definition: longrat.cc:2585

§ n_Sub_FieldZp()

static FORCE_INLINE number n_Sub_FieldZp ( number  n1,
number  n2,
const coeffs  r 
)
static

Definition at line 92 of file p_Numbers.h.

93 { return npSubM(n1, n2, r); }
static number npSubM(number a, number b, const coeffs r)
Definition: modulop.h:82