version 1.45, 2012/12/17 07:20:44 |
version 1.51, 2015/09/24 04:43:13 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/engine/dist.c,v 1.44 2011/03/30 02:43:18 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/engine/dist.c,v 1.50 2014/10/10 09:02:25 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
|
|
Line 71 int (*cmpdl)()=cmpdl_revgradlex; |
|
Line 71 int (*cmpdl)()=cmpdl_revgradlex; |
|
int (*cmpdl_tie_breaker)(); |
int (*cmpdl_tie_breaker)(); |
int (*primitive_cmpdl[3])() = {cmpdl_revgradlex,cmpdl_gradlex,cmpdl_lex}; |
int (*primitive_cmpdl[3])() = {cmpdl_revgradlex,cmpdl_gradlex,cmpdl_lex}; |
|
|
|
Obj current_top_weight; |
|
int current_top_weight_len; |
|
|
int do_weyl; |
int do_weyl; |
|
|
int dp_nelim,dp_fcoeffs; |
int dp_nelim,dp_fcoeffs; |
Line 82 void comm_muld_trunc(VL vl,DP p1,DP p2,DL dl,DP *pr); |
|
Line 85 void comm_muld_trunc(VL vl,DP p1,DP p2,DL dl,DP *pr); |
|
void comm_quod(VL vl,DP p1,DP p2,DP *pr); |
void comm_quod(VL vl,DP p1,DP p2,DP *pr); |
void muldm_trunc(VL vl,DP p,MP m0,DL dl,DP *pr); |
void muldm_trunc(VL vl,DP p,MP m0,DL dl,DP *pr); |
void muldc_trunc(VL vl,DP p,P c,DL dl,DP *pr); |
void muldc_trunc(VL vl,DP p,P c,DL dl,DP *pr); |
|
int create_order_spec(VL vl,Obj obj,struct order_spec **specp); |
|
void create_modorder_spec(int id,LIST shift,struct modorder_spec **s); |
|
|
void order_init() |
void order_init() |
{ |
{ |
Line 92 void order_init() |
|
Line 97 void order_init() |
|
create_modorder_spec(0,0,&dp_current_modspec); |
create_modorder_spec(0,0,&dp_current_modspec); |
} |
} |
|
|
|
int has_sfcoef_p(P f); |
|
|
int has_sfcoef(DP f) |
int has_sfcoef(DP f) |
{ |
{ |
MP t; |
MP t; |
Line 120 int has_sfcoef_p(P f) |
|
Line 127 int has_sfcoef_p(P f) |
|
} |
} |
} |
} |
|
|
extern N *current_top_weight_vector; |
extern Obj nd_top_weight; |
static int current_top_weight_len; |
|
|
|
|
void reset_top_weight() |
|
{ |
|
cmpdl = cmpdl_tie_breaker; |
|
cmpdl_tie_breaker = 0; |
|
nd_top_weight = 0; |
|
current_top_weight = 0; |
|
current_top_weight_len = 0; |
|
} |
|
|
void initd(struct order_spec *spec) |
void initd(struct order_spec *spec) |
{ |
{ |
int len,i; |
int len,i,k,row; |
|
Q **mat; |
|
|
switch ( spec->id ) { |
switch ( spec->id ) { |
case 3: |
case 3: |
Line 172 void initd(struct order_spec *spec) |
|
Line 188 void initd(struct order_spec *spec) |
|
} |
} |
break; |
break; |
} |
} |
if ( current_top_weight_vector ) { |
if ( current_top_weight ) { |
cmpdl_tie_breaker = cmpdl; |
cmpdl_tie_breaker = cmpdl; |
cmpdl = cmpdl_top_weight; |
cmpdl = cmpdl_top_weight; |
for ( len = 0, i = 0; i < spec->nv; i++ ) |
if ( OID(current_top_weight) == O_VECT ) { |
if ( current_top_weight_vector[i] ) |
mat = (Q **)&BDY((VECT)current_top_weight); |
len = MAX(PL(current_top_weight_vector[i]),len); |
row = 1; |
|
} else { |
|
mat = (Q **)BDY((MAT)current_top_weight); |
|
row = ((MAT)current_top_weight)->row; |
|
} |
|
for ( k = 0, len = 0; k < row; k++ ) |
|
for ( i = 0; i < spec->nv; i++ ) |
|
if ( mat[k][i] ) |
|
len = MAX(PL(NM(mat[k][i])),len); |
current_top_weight_len = len; |
current_top_weight_len = len; |
} |
} |
dp_current_spec = spec; |
dp_current_spec = spec; |
Line 185 void initd(struct order_spec *spec) |
|
Line 209 void initd(struct order_spec *spec) |
|
|
|
void ptod(VL vl,VL dvl,P p,DP *pr) |
void ptod(VL vl,VL dvl,P p,DP *pr) |
{ |
{ |
int isconst = 0; |
|
int n,i,j,k; |
int n,i,j,k; |
VL tvl; |
VL tvl; |
V v; |
V v; |
Line 313 int sugard(MP m) |
|
Line 336 int sugard(MP m) |
|
void addd(VL vl,DP p1,DP p2,DP *pr) |
void addd(VL vl,DP p1,DP p2,DP *pr) |
{ |
{ |
int n; |
int n; |
MP m1,m2,mr,mr0; |
MP m1,m2,mr=0,mr0; |
P t; |
P t; |
DL d; |
DL d; |
|
|
Line 373 void addd(VL vl,DP p1,DP p2,DP *pr) |
|
Line 396 void addd(VL vl,DP p1,DP p2,DP *pr) |
|
void symb_addd(DP p1,DP p2,DP *pr) |
void symb_addd(DP p1,DP p2,DP *pr) |
{ |
{ |
int n; |
int n; |
MP m1,m2,mr,mr0; |
MP m1,m2,mr=0,mr0; |
|
|
if ( !p1 ) |
if ( !p1 ) |
*pr = p2; |
*pr = p2; |
Line 424 void symb_addd(DP p1,DP p2,DP *pr) |
|
Line 447 void symb_addd(DP p1,DP p2,DP *pr) |
|
|
|
NODE symb_merge(NODE m1,NODE m2,int n) |
NODE symb_merge(NODE m1,NODE m2,int n) |
{ |
{ |
NODE top,prev,cur,m,t; |
NODE top=0,prev,cur,m=0,t; |
int c,i; |
|
DL d1,d2; |
DL d1,d2; |
|
|
if ( !m1 ) |
if ( !m1 ) |
Line 524 NODE symb_mul_merge(NODE m1,DL dl,DP f,int n) |
|
Line 546 NODE symb_mul_merge(NODE m1,DL dl,DP f,int n) |
|
if ( !cur ) { |
if ( !cur ) { |
MKDP(n,m,g); |
MKDP(n,m,g); |
NEXT(prev) = mul_dllist(dl,g); |
NEXT(prev) = mul_dllist(dl,g); |
return; |
return top; |
} |
} |
m = NEXT(m); |
m = NEXT(m); |
if ( m ) _adddl(n,m->dl,dl,t); |
if ( m ) _adddl(n,m->dl,dl,t); |
Line 534 NODE symb_mul_merge(NODE m1,DL dl,DP f,int n) |
|
Line 556 NODE symb_mul_merge(NODE m1,DL dl,DP f,int n) |
|
if ( !cur ) { |
if ( !cur ) { |
MKDP(n,m,g); |
MKDP(n,m,g); |
NEXT(prev) = mul_dllist(dl,g); |
NEXT(prev) = mul_dllist(dl,g); |
return; |
return top; |
} |
} |
break; |
break; |
case -1: |
case -1: |
Line 610 void subd(VL vl,DP p1,DP p2,DP *pr) |
|
Line 632 void subd(VL vl,DP p1,DP p2,DP *pr) |
|
|
|
void chsgnd(DP p,DP *pr) |
void chsgnd(DP p,DP *pr) |
{ |
{ |
MP m,mr,mr0; |
MP m,mr=0,mr0; |
Obj r; |
Obj r; |
|
|
if ( !p ) |
if ( !p ) |
Line 711 void comm_muld_trunc(VL vl,DP p1,DP p2,DL dl,DP *pr) |
|
Line 733 void comm_muld_trunc(VL vl,DP p1,DP p2,DL dl,DP *pr) |
|
|
|
void comm_quod(VL vl,DP p1,DP p2,DP *pr) |
void comm_quod(VL vl,DP p1,DP p2,DP *pr) |
{ |
{ |
MP m,m0; |
MP m=0,m0; |
DP s,t; |
DP s,t; |
int i,n,sugar; |
int i,n,sugar; |
DL d1,d2,d; |
DL d1,d2,d; |
Line 752 void comm_quod(VL vl,DP p1,DP p2,DP *pr) |
|
Line 774 void comm_quod(VL vl,DP p1,DP p2,DP *pr) |
|
|
|
void muldm(VL vl,DP p,MP m0,DP *pr) |
void muldm(VL vl,DP p,MP m0,DP *pr) |
{ |
{ |
MP m,mr,mr0; |
MP m,mr=0,mr0; |
P c; |
P c; |
DL d; |
DL d; |
int n; |
int n; |
Line 777 void muldm(VL vl,DP p,MP m0,DP *pr) |
|
Line 799 void muldm(VL vl,DP p,MP m0,DP *pr) |
|
|
|
void muldm_trunc(VL vl,DP p,MP m0,DL dl,DP *pr) |
void muldm_trunc(VL vl,DP p,MP m0,DL dl,DP *pr) |
{ |
{ |
MP m,mr,mr0; |
MP m,mr=0,mr0; |
P c; |
P c; |
DL d,tdl; |
DL d,tdl; |
int n,i; |
int n,i; |
Line 843 void weyl_muld(VL vl,DP p1,DP p2,DP *pr) |
|
Line 865 void weyl_muld(VL vl,DP p1,DP p2,DP *pr) |
|
} |
} |
} |
} |
|
|
|
void actm(VL vl,int nv,MP m1,MP m2,DP *pr) |
|
{ |
|
DL d1,d2,d; |
|
int n2,i,j,k; |
|
Q jq,c,c1; |
|
MP m; |
|
P t; |
|
|
|
d1 = m1->dl; |
|
d2 = m2->dl; |
|
for ( i = 0; i < nv; i++ ) |
|
if ( d1->d[i] > d2->d[i] ) { |
|
*pr = 0; return; |
|
} |
|
NEWDL(d,nv); |
|
c = ONE; |
|
for ( i = 0; i < nv; i++ ) { |
|
for ( j = d2->d[i], k = d1->d[i]; k > 0; k--, j-- ) { |
|
STOQ(j,jq); mulq(c,jq,&c1); c = c1; |
|
} |
|
d->d[i] = d2->d[i]-d1->d[i]; |
|
} |
|
mulp(vl,C(m1),C(m2),&t); |
|
NEWMP(m); |
|
mulp(vl,(P)c,t,&C(m)); |
|
m->dl = d; |
|
MKDP(nv,m,*pr); |
|
} |
|
|
|
void weyl_actd(VL vl,DP p1,DP p2,DP *pr) |
|
{ |
|
int n; |
|
MP m1,m2; |
|
DP d,r,s; |
|
|
|
if ( !p1 || !p2 ) *pr = 0; |
|
else { |
|
n = NV(p1); |
|
r = 0; |
|
for ( m1 = BDY(p1); m1; m1 = NEXT(m1) ) |
|
for ( m2 = BDY(p2); m2; m2 = NEXT(m2) ) { |
|
actm(vl,n,m1,m2,&d); |
|
addd(vl,r,d,&s); r = s; |
|
} |
|
*pr = r; |
|
} |
|
} |
|
|
/* monomial * polynomial */ |
/* monomial * polynomial */ |
|
|
void weyl_muldm(VL vl,MP m0,DP p,DP *pr) |
void weyl_muldm(VL vl,MP m0,DP p,DP *pr) |
Line 1029 void comm_muld_tab(VL vl,int nv,struct cdl *t,int n,st |
|
Line 1099 void comm_muld_tab(VL vl,int nv,struct cdl *t,int n,st |
|
|
|
void muldc(VL vl,DP p,P c,DP *pr) |
void muldc(VL vl,DP p,P c,DP *pr) |
{ |
{ |
MP m,mr,mr0; |
MP m,mr=0,mr0; |
|
|
if ( !p || !c ) |
if ( !p || !c ) |
*pr = 0; |
*pr = 0; |
Line 1054 void muldc(VL vl,DP p,P c,DP *pr) |
|
Line 1124 void muldc(VL vl,DP p,P c,DP *pr) |
|
|
|
void muldc_trunc(VL vl,DP p,P c,DL dl,DP *pr) |
void muldc_trunc(VL vl,DP p,P c,DL dl,DP *pr) |
{ |
{ |
MP m,mr,mr0; |
MP m,mr=0,mr0; |
DL mdl; |
DL mdl; |
int i,n; |
int i,n; |
|
|
Line 1083 void muldc_trunc(VL vl,DP p,P c,DL dl,DP *pr) |
|
Line 1153 void muldc_trunc(VL vl,DP p,P c,DL dl,DP *pr) |
|
|
|
void divsdc(VL vl,DP p,P c,DP *pr) |
void divsdc(VL vl,DP p,P c,DP *pr) |
{ |
{ |
MP m,mr,mr0; |
MP m,mr=0,mr0; |
|
|
if ( !c ) |
if ( !c ) |
error("disvsdc : division by 0"); |
error("disvsdc : division by 0"); |
Line 1130 int compd(VL vl,DP p1,DP p2) |
|
Line 1200 int compd(VL vl,DP p1,DP p2) |
|
return p2 ? -1 : 0; |
return p2 ? -1 : 0; |
else if ( !p2 ) |
else if ( !p2 ) |
return 1; |
return 1; |
else if ( NV(p1) != NV(p2) ) |
else if ( NV(p1) != NV(p2) ) { |
error("compd : size mismatch"); |
error("compd : size mismatch"); |
else { |
return 0; /* XXX */ |
|
} else { |
for ( n = NV(p1), m1 = BDY(p1), m2 = BDY(p2); |
for ( n = NV(p1), m1 = BDY(p1), m2 = BDY(p2); |
m1 && m2; m1 = NEXT(m1), m2 = NEXT(m2) ) |
m1 && m2; m1 = NEXT(m1), m2 = NEXT(m2) ) |
if ( (t = (*cmpdl)(n,m1->dl,m2->dl)) || |
if ( (t = (*cmpdl)(n,m1->dl,m2->dl)) || |
Line 1253 int cmpdl_blex(int n,DL d1,DL d2) |
|
Line 1324 int cmpdl_blex(int n,DL d1,DL d2) |
|
{ |
{ |
int c; |
int c; |
|
|
if ( c = cmpdl_lex(n-1,d1,d2) ) |
if ( (c = cmpdl_lex(n-1,d1,d2)) ) |
return c; |
return c; |
else { |
else { |
c = d1->d[n-1] - d2->d[n-1]; |
c = d1->d[n-1] - d2->d[n-1]; |
Line 1458 int cmpdl_drl_zigzag(int n,DL d1,DL d2) |
|
Line 1529 int cmpdl_drl_zigzag(int n,DL d1,DL d2) |
|
else { |
else { |
m = n>>1; |
m = n>>1; |
for ( i= m - 1, p1 = d1->d, p2 = d2->d; i >= 0; i-- ) { |
for ( i= m - 1, p1 = d1->d, p2 = d2->d; i >= 0; i-- ) { |
if ( t = p1[m+i] - p2[m+i] ) return t > 0 ? -1 : 1; |
if ( (t = p1[m+i] - p2[m+i]) ) return t > 0 ? -1 : 1; |
if ( t = p1[i] - p2[i] ) return t > 0 ? -1 : 1; |
if ( (t = p1[i] - p2[i]) ) return t > 0 ? -1 : 1; |
} |
} |
return 0; |
return 0; |
} |
} |
Line 1493 int cmpdl_homo_ww_drl_zigzag(int n,DL d1,DL d2) |
|
Line 1564 int cmpdl_homo_ww_drl_zigzag(int n,DL d1,DL d2) |
|
return -1; |
return -1; |
|
|
for ( i= m - 1, p1 = d1->d, p2 = d2->d; i >= 0; i-- ) { |
for ( i= m - 1, p1 = d1->d, p2 = d2->d; i >= 0; i-- ) { |
if ( t = p1[m+i] - p2[m+i] ) return t > 0 ? -1 : 1; |
if ( (t = p1[m+i] - p2[m+i]) ) return t > 0 ? -1 : 1; |
if ( t = p1[i] - p2[i] ) return t > 0 ? -1 : 1; |
if ( (t = p1[i] - p2[i]) ) return t > 0 ? -1 : 1; |
} |
} |
return 0; |
return 0; |
} |
} |
Line 1653 int cmpdl_top_weight(int n,DL d1,DL d2) |
|
Line 1724 int cmpdl_top_weight(int n,DL d1,DL d2) |
|
{ |
{ |
int *w; |
int *w; |
N sum,wm,wma,t; |
N sum,wm,wma,t; |
N *a; |
Q **mat; |
|
Q *a; |
struct oN tn; |
struct oN tn; |
int len,i,sgn,tsgn; |
int len,i,sgn,tsgn,row,k; |
int *t1,*t2; |
int *t1,*t2; |
|
|
w = (int *)ALLOCA(n*sizeof(int)); |
w = (int *)ALLOCA(n*sizeof(int)); |
Line 1665 int cmpdl_top_weight(int n,DL d1,DL d2) |
|
Line 1737 int cmpdl_top_weight(int n,DL d1,DL d2) |
|
sum = (N)W_ALLOC(len); sgn = 0; |
sum = (N)W_ALLOC(len); sgn = 0; |
wm = (N)W_ALLOC(len); |
wm = (N)W_ALLOC(len); |
wma = (N)W_ALLOC(len); |
wma = (N)W_ALLOC(len); |
a = current_top_weight_vector; |
if ( OID(current_top_weight) == O_VECT ) { |
for ( i = 0; i < n; i++ ) { |
mat = (Q **)&BDY((VECT)current_top_weight); |
if ( !a[i] || !w[i] ) continue; |
row = 1; |
tn.p = 1; |
} else { |
if ( w[i] > 0 ) { |
mat = (Q **)BDY((MAT)current_top_weight); |
tn.b[0] = w[i]; tsgn = 1; |
row = ((MAT)current_top_weight)->row; |
} else { |
|
tn.b[0] = -w[i]; tsgn = -1; |
|
} |
|
_muln(a[i],&tn,wm); |
|
if ( !sgn ) { |
|
sgn = tsgn; |
|
t = wm; wm = sum; sum = t; |
|
} else if ( sgn == tsgn ) { |
|
_addn(sum,wm,wma); |
|
if ( !PL(wma) ) |
|
sgn = 0; |
|
t = wma; wma = sum; sum = t; |
|
} else { |
|
sgn *= _subn(sum,wm,wma); |
|
t = wma; wma = sum; sum = t; |
|
} |
|
} |
} |
if ( sgn > 0 ) return 1; |
for ( k = 0; k < row; k++ ) { |
else if ( sgn < 0 ) return -1; |
a = mat[k]; |
else return (*cmpdl_tie_breaker)(n,d1,d2); |
for ( i = 0; i < n; i++ ) { |
|
if ( !a[i] || !w[i] ) continue; |
|
tn.p = 1; |
|
if ( w[i] > 0 ) { |
|
tn.b[0] = w[i]; tsgn = 1; |
|
} else { |
|
tn.b[0] = -w[i]; tsgn = -1; |
|
} |
|
_muln(NM(a[i]),&tn,wm); |
|
if ( !sgn ) { |
|
sgn = tsgn; |
|
t = wm; wm = sum; sum = t; |
|
} else if ( sgn == tsgn ) { |
|
_addn(sum,wm,wma); |
|
if ( !PL(wma) ) |
|
sgn = 0; |
|
t = wma; wma = sum; sum = t; |
|
} else { |
|
sgn *= _subn(sum,wm,wma); |
|
t = wma; wma = sum; sum = t; |
|
} |
|
} |
|
if ( sgn > 0 ) return 1; |
|
else if ( sgn < 0 ) return -1; |
|
} |
|
return (*cmpdl_tie_breaker)(n,d1,d2); |
} |
} |
|
|
GeoBucket create_bucket() |
GeoBucket create_bucket() |
Line 1702 GeoBucket create_bucket() |
|
Line 1783 GeoBucket create_bucket() |
|
return g; |
return g; |
} |
} |
|
|
|
int length(NODE d); |
|
|
void add_bucket(GeoBucket g,NODE d,int nv) |
void add_bucket(GeoBucket g,NODE d,int nv) |
{ |
{ |
int l,k,m; |
int l,k,m; |
Line 1825 int compdv(VL vl,DPV p1,DPV p2) |
|
Line 1908 int compdv(VL vl,DPV p1,DPV p2) |
|
{ |
{ |
int i,t,len; |
int i,t,len; |
|
|
if ( p1->len != p2->len ) |
if ( p1->len != p2->len ) { |
error("compdv : size mismatch"); |
error("compdv : size mismatch"); |
else { |
return 0; /* XXX */ |
|
} else { |
len = p1->len; |
len = p1->len; |
for ( i = 0; i < len; i++ ) |
for ( i = 0; i < len; i++ ) |
if ( t = compd(vl,p1->body[i],p2->body[i]) ) |
if ( (t = compd(vl,p1->body[i],p2->body[i])) ) |
return t; |
return t; |
return 0; |
return 0; |
} |
} |
Line 1856 int ni_next(int *a,int n) |
|
Line 1940 int ni_next(int *a,int n) |
|
|
|
int comp_nbm(NBM a,NBM b) |
int comp_nbm(NBM a,NBM b) |
{ |
{ |
int d,i,w,ai,bi; |
int d,i,ai,bi; |
int *ab,*bb; |
int *ab,*bb; |
|
|
if ( a->d > b->d ) return 1; |
if ( a->d > b->d ) return 1; |
Line 1885 NBM mul_nbm(NBM a,NBM b) |
|
Line 1969 NBM mul_nbm(NBM a,NBM b) |
|
int ad,bd,d,i,j; |
int ad,bd,d,i,j; |
int *ab,*bb,*mb; |
int *ab,*bb,*mb; |
NBM m; |
NBM m; |
NODE r; |
|
NBP u; |
|
|
|
ad = a->d; bd = b->d; ab = a->b; bb = b->b; |
ad = a->d; bd = b->d; ab = a->b; bb = b->b; |
d = ad + bd; |
d = ad + bd; |
Line 2079 NBP harmonic_mul_nbm(NBM a,NBM b) |
|
Line 2161 NBP harmonic_mul_nbm(NBM a,NBM b) |
|
|
|
void addnbp(VL vl,NBP p1,NBP p2, NBP *rp) |
void addnbp(VL vl,NBP p1,NBP p2, NBP *rp) |
{ |
{ |
NODE b1,b2,br,br0; |
NODE b1,b2,br=0,br0; |
NBM m1,m2,m; |
NBM m1,m2,m; |
P c; |
P c; |
|
|
Line 2136 void subnbp(VL vl,NBP p1,NBP p2, NBP *rp) |
|
Line 2218 void subnbp(VL vl,NBP p1,NBP p2, NBP *rp) |
|
|
|
void chsgnnbp(NBP p,NBP *rp) |
void chsgnnbp(NBP p,NBP *rp) |
{ |
{ |
NODE r0,r,b; |
NODE r0,r=0,b; |
NBM m,m1; |
NBM m,m1; |
|
|
for ( r0 = 0, b = BDY(p); b; b = NEXT(b) ) { |
for ( r0 = 0, b = BDY(p); b; b = NEXT(b) ) { |
Line 2187 void mulnbp(VL vl,NBP p1,NBP p2, NBP *rp) |
|
Line 2269 void mulnbp(VL vl,NBP p1,NBP p2, NBP *rp) |
|
|
|
void mulnbmnbp(VL vl,NBM m,NBP p, NBP *rp) |
void mulnbmnbp(VL vl,NBM m,NBP p, NBP *rp) |
{ |
{ |
NODE b,r0,r; |
NODE b,r0,r=0; |
|
|
if ( !p ) *rp = 0; |
if ( !p ) *rp = 0; |
else { |
else { |
Line 2202 void mulnbmnbp(VL vl,NBM m,NBP p, NBP *rp) |
|
Line 2284 void mulnbmnbp(VL vl,NBM m,NBP p, NBP *rp) |
|
|
|
void mulnbpnbm(VL vl,NBP p,NBM m, NBP *rp) |
void mulnbpnbm(VL vl,NBP p,NBM m, NBP *rp) |
{ |
{ |
NODE b,r0,r; |
NODE b,r0,r=0; |
|
|
if ( !p ) *rp = 0; |
if ( !p ) *rp = 0; |
else { |
else { |