264static inline int max(
int a,
int b)
268static inline int min(
int a,
int b)
278 if ((
df==0)||(
dg==0))
345 if (n==0)
return p_ISet(1,r);
487static void buildTermAndAdd(
int ,
number* ,poly* ,
int*
exp,
int f_len,
kBucket_pt ,
ring r,
number coef, poly &
zw, poly , poly**
term_pot){
528static void MC_iterate(poly
f,
int n,
ring r,
int f_len,
number*
facult,
int*
exp,poly*
f_terms,
kBucket_pt erg_bucket,
int pos,
int sum,
number coef, poly &
zw, poly
tmp, poly**
term_pot){
560 MC_iterate(
f, n, r,
f_len,
facult,
exp,
f_terms,
erg_bucket,pos+1,
sum+
i,
new_coef,
zw_real,
tmp,
term_pot);
583 buildTermAndAdd(n,
facult,
f_terms,
exp,
f_len,
erg_bucket,r,
new_coef,
zw,
tmp,
term_pot);
593 WerrorS(
"Char not 0, pFastPowerMC not implemented for this case");
595 WerrorS(
"not implemented for so small n, recursion fails");
597 WerrorS(
"not implemented for so small length of f, recursion fails");
638 MC_iterate(
f,n,r,
f_len,&
facult[0], &
exp[0], &
f_terms[0],
erg_bucket,0,0,one,
zw,
tmp,
term_potences);
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
const CanonicalForm int const CFList const Variable & y
poly unifastmult(poly f, poly g, ring r)
static int min(int a, int b)
static const int pass_option
static poly do_unifastmult(poly f, int df, poly g, int dg, int vn, fastmultrec rec, ring r)
poly fastmultrec(poly f, poly g, ring r)
static void p_MonMultMB(poly p, poly q, ring r)
poly pFastPowerMC(poly f, int n, ring r)
static int max(int a, int b)
static void MC_iterate(poly f, int n, ring r, int f_len, number *facult, int *exp, poly *f_terms, kBucket_pt erg_bucket, int pos, int sum, number coef, poly &zw, poly tmp, poly **term_pot)
static void buildTermAndAdd(int, number *, poly *, int *exp, int f_len, kBucket_pt, ring r, number coef, poly &zw, poly, poly **term_pot)
static poly p_MonMultCMB(poly p, poly q, ring r)
poly pFastPower(poly f, int n, ring r)
static void div_by_x_power_n(poly p, int n, int vn, ring r)
poly multifastmult(poly f, poly g, ring r)
static void degsplit(poly p, int n, poly &p1, poly &p2, int vn, ring r)
void WerrorS(const char *s)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
void kBucketDestroy(kBucket_pt *bucket_pt)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
void kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.
#define p_SetCoeff0(p, n, r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
gmp_float exp(const gmp_float &a)
#define omGetSpecBin(size)
#define omUnGetSpecBin(bin_ptr)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
void p_Normalize(poly p, const ring r)
static poly p_Neg(poly p, const ring r)
static int pLength(poly a)
static void p_ExpVectorSum(poly pr, poly p1, poly p2, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
static poly pp_Mult_mm(poly p, poly m, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static void p_Setm(poly p, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static long p_MultExp(poly p, int v, long ee, ring r)
static void p_Delete(poly *p, const ring r)
static poly pp_Mult_qq(poly p, poly q, const ring r)
static poly p_Mult_mm(poly p, poly m, const ring r)
static poly p_Init(const ring r, omBin bin)
static poly p_Copy(poly p, const ring r)
returns a copy of p
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static short rVar(const ring r)
#define rVar(r) (r->N)