version 1.9, 2000/12/08 08:26:08 |
version 1.11, 2000/12/13 05:37:29 |
|
|
* 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/builtin/dp-supp.c,v 1.8 2000/12/08 06:43:09 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/dp-supp.c,v 1.10 2000/12/11 02:00:40 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
|
|
divsmp(CO,mod,c1,c2,&u); c1 = u; c2 = (P)ONEM; |
divsmp(CO,mod,c1,c2,&u); c1 = u; c2 = (P)ONEM; |
} |
} |
NEWMP(m); m->dl = d; chsgnmp(mod,(P)c1,&m->c); NEXT(m) = 0; |
NEWMP(m); m->dl = d; chsgnmp(mod,(P)c1,&m->c); NEXT(m) = 0; |
MKDP(n,m,s); s->sugar = d->td; mulmd(CO,mod,p2,s,&t); |
MKDP(n,m,s); s->sugar = d->td; mulmd(CO,mod,s,p2,&t); |
if ( NUM(c2) ) { |
if ( NUM(c2) ) { |
addmd(CO,mod,p1,t,&r); h = p0; |
addmd(CO,mod,p1,t,&r); h = p0; |
} else { |
} else { |
|
|
*head = h; *rest = r; *dnp = c2; |
*head = h; *rest = r; *dnp = c2; |
} |
} |
|
|
|
struct oEGT eg_red_mod; |
|
|
void _dp_red_mod_destructive(p1,p2,mod,rp) |
void _dp_red_mod_destructive(p1,p2,mod,rp) |
DP p1,p2; |
DP p1,p2; |
int mod; |
int mod; |
|
|
MP m; |
MP m; |
DP t,s; |
DP t,s; |
int c,c1; |
int c,c1; |
|
struct oEGT t0,t1; |
|
|
n = p1->nv; d1 = BDY(p1)->dl; d2 = BDY(p2)->dl; |
n = p1->nv; d1 = BDY(p1)->dl; d2 = BDY(p2)->dl; |
_NEWDL(d,n); d->td = d1->td - d2->td; |
_NEWDL(d,n); d->td = d1->td - d2->td; |
|
|
_NEWMP(m); m->dl = d; m->c = STOI(mod-c1); NEXT(m) = 0; |
_NEWMP(m); m->dl = d; m->c = STOI(mod-c1); NEXT(m) = 0; |
_MKDP(n,m,s); s->sugar = d->td; |
_MKDP(n,m,s); s->sugar = d->td; |
_mulmd_dup(mod,s,p2,&t); _free_dp(s); |
_mulmd_dup(mod,s,p2,&t); _free_dp(s); |
|
/* get_eg(&t0); */ |
_addmd_destructive(mod,p1,t,rp); |
_addmd_destructive(mod,p1,t,rp); |
|
/* get_eg(&t1); add_eg(&eg_red_mod,&t0,&t1); */ |
} |
} |
|
|
/* |
/* |