version 1.6, 2004/12/07 15:15:52 |
version 1.7, 2004/12/10 02:45:02 |
|
|
/* |
/* |
* $OpenXM: OpenXM_contrib2/asir2000/engine/dalg.c,v 1.5 2004/12/04 09:39:27 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/engine/dalg.c,v 1.6 2004/12/07 15:15:52 noro Exp $ |
*/ |
*/ |
|
|
#include "ca.h" |
#include "ca.h" |
Line 505 void invdalg(DAlg a,DAlg *c) |
|
Line 505 void invdalg(DAlg a,DAlg *c) |
|
N ln,gn,qn; |
N ln,gn,qn; |
DAlg *simp; |
DAlg *simp; |
DAlg t,a0,r; |
DAlg t,a0,r; |
Q dn,dnsol,mul; |
Q dn,dnsol,mul,nmc,dn1; |
MAT mobj,sol; |
MAT mobj,sol; |
Q **mat,**solmat; |
Q **mat,**solmat; |
MP mp0,mp; |
MP mp0,mp; |
Line 526 void invdalg(DAlg a,DAlg *c) |
|
Line 526 void invdalg(DAlg a,DAlg *c) |
|
mb = nf->mb; |
mb = nf->mb; |
n = nf->n; |
n = nf->n; |
ln = ONEN; |
ln = ONEN; |
MKDAlg(a->nm,ONE,a0); |
dp_ptozp(a->nm,&u); divq((Q)BDY(a->nm)->c,(Q)BDY(u)->c,&nmc); |
|
MKDAlg(u,ONE,a0); |
simp = (DAlg *)ALLOCA(dim*sizeof(DAlg)); |
simp = (DAlg *)ALLOCA(dim*sizeof(DAlg)); |
current_spec = dp_current_spec; initd(nf->spec); |
current_spec = dp_current_spec; initd(nf->spec); |
for ( i = dim-1; i >= 0; i-- ) { |
for ( i = dim-1; i >= 0; i-- ) { |
Line 570 void invdalg(DAlg a,DAlg *c) |
|
Line 571 void invdalg(DAlg a,DAlg *c) |
|
mp->dl = BDY(mb[i])->dl; |
mp->dl = BDY(mb[i])->dl; |
} |
} |
NEXT(mp) = 0; MKDP(n,mp0,u); |
NEXT(mp) = 0; MKDP(n,mp0,u); |
MKDAlg(u,dnsol,r); |
mulq(dnsol,nmc,&dn1); |
|
MKDAlg(u,dn1,r); |
rmcontdalg(r,c); |
rmcontdalg(r,c); |
} |
} |
|
|