[BACK]Return to sugar.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/sugar.c between version 1.3 and 1.4

version 1.3, 2001/05/04 01:06:25 version 1.4, 2003/05/01 01:58:05
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/sugar.c,v 1.2 2000/01/16 07:55:41 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/sugar.c,v 1.3 2001/05/04 01:06:25 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "extern2.h"  #include "extern2.h"
Line 6 
Line 6 
   
 #define mymax(p,q) (p>q?p:q)  #define mymax(p,q) (p>q?p:q)
   
 static int DebugReduction = 0;  /* static int DebugReduction = 0;
   */
   extern DebugReductionRed;
   
 POLY reduction_sugar(POLY f,struct gradedPolySet *gset,int needSyz,  POLY reduction_sugar(POLY f,struct gradedPolySet *gset,int needSyz,
                      struct syz0 *syzp,int sugarGrade)                       struct syz0 *syzp,int sugarGrade)
Line 92  POLY reduction1_sugar(f,g,needSyz,c,h,sugarGrade)
Line 94  POLY reduction1_sugar(f,g,needSyz,c,h,sugarGrade)
   
   sv = (*sp)(f,g);    sv = (*sp)(f,g);
   f2 = ppAddv(cpMult((sv.a)->coeffp,f),ppMult(sv.b,g));    f2 = ppAddv(cpMult((sv.a)->coeffp,f),ppMult(sv.b,g));
   if (DebugReduction) {    if (DebugReductionRed) {
     printf("c=%s, d=%s, g=%s:  f --> c*f + d*g.\n",      printf("c=%s, d=%s, g=%s:  f --> c*f + d*g.\n",
            POLYToString(sv.a,'*',1),POLYToString(sv.b,'*',1),POLYToString(g,'*',1));             POLYToString(sv.a,'*',1),POLYToString(sv.b,'*',1),POLYToString(g,'*',1));
     printf("%s --> %s\n",POLYToString(f,'*',1),POLYToString(f2,'*',1));      printf("%s --> %s\n",POLYToString(f,'*',1),POLYToString(f2,'*',1));
Line 110  POLY reduction1_sugar(f,g,needSyz,c,h,sugarGrade)
Line 112  POLY reduction1_sugar(f,g,needSyz,c,h,sugarGrade)
     if (tdegm+grd <= sugarGrade) {      if (tdegm+grd <= sugarGrade) {
       sv = (*sp)(f,g);        sv = (*sp)(f,g);
       f2 = ppAddv(cpMult((sv.a)->coeffp,f),ppMult(sv.b,g));        f2 = ppAddv(cpMult((sv.a)->coeffp,f),ppMult(sv.b,g));
       if (DebugReduction) {        if (DebugReductionRed) {
         printf("! c=%s, d=%s, g=%s:  f --> c*f + d*g.\n",          printf("! c=%s, d=%s, g=%s:  f --> c*f + d*g.\n",
                POLYToString(sv.a,'*',1),POLYToString(sv.b,'*',1),POLYToString(g,'*',1));                 POLYToString(sv.a,'*',1),POLYToString(sv.b,'*',1),POLYToString(g,'*',1));
         printf("%s --> %s\n",POLYToString(f,'*',1),POLYToString(f2,'*',1));          printf("%s --> %s\n",POLYToString(f,'*',1),POLYToString(f2,'*',1));

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>