version 1.13, 2003/08/22 01:02:45 |
version 1.15, 2003/08/26 05:52:43 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/ecart.c,v 1.12 2003/08/21 12:28:57 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/ecart.c,v 1.14 2003/08/26 05:06:01 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "extern2.h" |
#include "extern2.h" |
Line 297 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
Line 297 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
POLY cf_o; |
POLY cf_o; |
POLY syz_o; |
POLY syz_o; |
POLY r_0; |
POLY r_0; |
|
int se; |
|
struct coeff *cont; |
|
|
extern struct ring *CurrentRingp; |
extern struct ring *CurrentRingp; |
struct ring *rp; |
struct ring *rp; |
Line 316 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
Line 318 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
} |
} |
} |
} |
|
|
|
if (DoCancel && (r != POLYNULL)) shouldReduceContent(r,1); |
|
|
if (DebugReductionEcart&1) printf("--------------------------------------\n"); |
if (DebugReductionEcart&1) printf("--------------------------------------\n"); |
do { |
do { |
if (DebugReductionRed) printf("r=%s\n",POLYToString(r,'*',1)); |
if (DebugReductionRed) printf("r=%s\n",POLYToString(r,'*',1)); |
Line 339 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
Line 343 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
} |
} |
if (ell > 0) r = mpMult(cxx(1,0,ell,rp),r); /* r = s^ell r */ |
if (ell > 0) r = mpMult(cxx(1,0,ell,rp),r); /* r = s^ell r */ |
r = (*reduction1)(r,pp,needSyz,&cc,&cg); |
r = (*reduction1)(r,pp,needSyz,&cc,&cg); |
|
|
|
if (DoCancel && (r != POLYNULL)) { |
|
if (shouldReduceContent(r,0)) { |
|
r = reduceContentOfPoly(r,&cont); |
|
shouldReduceContent(r,1); |
|
if (DebugReductionEcart || DebugReductionRed || DebugContentReduction) printf("CONT=%s ",coeffToString(cont)); |
|
} |
|
} |
|
|
|
|
if (needSyz) { |
if (needSyz) { |
if (ells.first) { |
if (ells.first) { |
if (ell >0) cc = ppMult(cc,cxx(1,0,ell,rp)); |
if (ell >0) cc = ppMult(cc,cxx(1,0,ell,rp)); |
Line 368 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
Line 382 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
} |
} |
} |
} |
if (r ISZERO) goto ss; |
if (r ISZERO) goto ss; |
/*r = ecartDivideSv(r,&se); r = r/s^? Don't do this. */ |
|
|
/* r = r/s^? Don't do this?? */ |
|
r = ecartDivideSv(r,&se); |
|
if (needSyz && (se > 0)) { |
|
POLY tt; |
|
tt = cxx(1,0,-se,rp); |
|
cf = mpMult(tt,cf); |
|
syz = cpMult(toSyzCoeff(tt),syz); |
|
} |
|
|
} |
} |
}while (ell >= 0); |
}while (ell >= 0); |
|
|
Line 378 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
Line 401 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
syzp->syz = syz; /* syz is in the SyzRingp */ |
syzp->syz = syz; /* syz is in the SyzRingp */ |
} |
} |
|
|
|
if (DoCancel && (r != POLYNULL)) { |
|
if (r->m->ringp->p == 0) { |
|
r = reduceContentOfPoly(r,&cont); |
|
if (DebugReductionEcart || DebugReductionRed || DebugContentReduction) printf("cont=%s ",coeffToString(cont)); |
|
} |
|
} |
|
|
return(r); |
return(r); |
} |
} |
|
|
Line 499 static POLY reduction_ecart1(r,gset,needSyz,syzp) |
|
Line 529 static POLY reduction_ecart1(r,gset,needSyz,syzp) |
|
|
|
if (r ISZERO) goto ss1; |
if (r ISZERO) goto ss1; |
r = ecartDivideSv(r,&se); /* r = r/s^? */ |
r = ecartDivideSv(r,&se); /* r = r/s^? */ |
|
|
|
if (needSyz && (se > 0)) { /* It may not necessary because of dehomo*/ |
|
POLY tt; |
|
/*printf("!1/H!"); fflush(NULL);*/ /* misc-2003/ecart/t1.sm1 foo4 */ |
|
tt = cxx(1,0,-se,rp); |
|
cf = mpMult(tt,cf); |
|
syz = cpMult(toSyzCoeff(tt),syz); |
|
} |
|
|
} |
} |
}while (ell >= 0); |
}while (ell >= 0); |
|
|