589{
590
591
593 WerrorS(
"Char not 0, pFastPowerMC not implemented for this case");
594 if (n<=1)
595 WerrorS(
"not implemented for so small n, recursion fails");
597 WerrorS(
"not implemented for so small length of f, recursion fails");
598
599 number* facult=(number*)
omAlloc((n+1)*
sizeof(number));
600 facult[0]=
n_Init(1,r->cf);
603 {
605 facult[
i]=
n_Mult(this_n,facult[
i-1],r->cf);
607 }
608
610
615
616 poly* f_terms=(poly*)
omAlloc(f_len*
sizeof(poly));
617 poly** term_potences=(poly**)
omAlloc(f_len*
sizeof(poly*));
618
621 {
623 f_iter=
pNext(f_iter);
624 }
626 {
627 term_potences[
i]=(poly*)
omAlloc((n+1)*
sizeof(poly));
628 term_potences[
i][0]=
p_ISet(1,r);
632 }
633 }
637 number one=
n_Init(1,r->cf);
638 MC_iterate(
f,n,r,f_len,&facult[0], &
exp[0], &f_terms[0],erg_bucket,0,0,one,zw,tmp, term_potences);
639
640
642
643
644
645
646
647
649 {
651 }
652 int i2;
653 for (
i=0;
i<f_len;
i++)
654 {
655 for(i2=0;i2<=n;i2++)
656 {
658 }
660
661 }
667 int len=0;
668 poly erg;
672 return erg;
673}
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 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 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 poly p_MonMultCMB(poly p, poly q, 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.
gmp_float exp(const gmp_float &a)
#define omGetSpecBin(size)
#define omUnGetSpecBin(bin_ptr)
static void p_Delete(poly *p, const ring r)
static poly p_Init(const ring r, omBin bin)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...