version 1.13, 2003/08/22 01:02:45 |
version 1.14, 2003/08/26 05:06:01 |
|
|
/* $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.13 2003/08/22 01:02:45 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; |
|
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 317 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 342 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 376 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
Line 389 static POLY reduction_ecart0(r,gset,needSyz,syzp) |
|
if (needSyz) { |
if (needSyz) { |
syzp->cf = cf; /* cf is in the CurrentRingp */ |
syzp->cf = cf; /* cf is in the CurrentRingp */ |
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); |