Changeset 17a710 in git for factory/cfNewtonPolygon.cc


Ignore:
Timestamp:
Apr 19, 2013, 3:34:15 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
f7ed7dc2ce876bee21478ae1bf88e2734992bcd8
Parents:
efd410fc3eac114fbca114eb66d8070b61317f92
git-author:
Martin Lee <martinlee84@web.de>2013-04-19 15:34:15+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-05-02 11:42:37+02:00
Message:
chg: debug output and experimental code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cfNewtonPolygon.cc

    refd410 r17a710  
    2323#include "templates/ftmpl_functions.h"
    2424#include "algext.h"
     25
     26void out_cf(const char *s1,const CanonicalForm &f,const char *s2);
    2527
    2628static
     
    921923  CanonicalForm g= gcd (newtonPolyg[0][0], newtonPolyg[0][1]); //maybe it's better to use plain intgcd
    922924
     925
     926  printf ("newtonPolyg[0]= %d\n", newtonPolyg[0][0]);
     927  printf ("newtonPolyg[0]= %d\n", newtonPolyg[0][1]);
     928  out_cf ("g= ", g, "\n");
     929
    923930  int i= 1;
    924931  while (!g.isOne() && i < sizeOfNewtonPolygon)
     
    926933    g= gcd (g, newtonPolyg[i][0]);
    927934    g= gcd (g, newtonPolyg[i][1]);
     935  printf ("newtonPolyg[i]= %d\n", newtonPolyg[i][0]);
     936  printf ("newtonPolyg[i]= %d\n", newtonPolyg[i][1]);
     937    out_cf ("g= ", g, "\n");
    928938    i++;
    929939  }
     
    10291039  ASSERT (factorize (F).length() <= 2, " expected irreducible polynomial");
    10301040
     1041  out_cf ("F= ", F, "\n");
    10311042  bool isRat= isOn (SW_RATIONAL);
    10321043  if (isRat)
     
    10531064  Fp= Fp (y+E[2], y);
    10541065
     1066  out_cf ("Fp0= ", Fp, "\n");
     1067
    10551068  if (tdeg == totaldegree (Fp))
    10561069  {
     
    10601073      if (factors.length() == 2 && factors.getLast().exp() == 1)
    10611074      {
     1075        printf ("irred1\n");
    10621076        if (isRat)
    10631077          On (SW_RATIONAL);
     
    10731087  Fp= Fp (y+E[2], y);
    10741088
     1089  out_cf ("Fp1= ", Fp, "\n");
     1090
    10751091  if (tdeg == totaldegree (Fp))
    10761092  {
     
    10801096      if (factors.length() == 2 && factors.getLast().exp() == 1)
    10811097      {
     1098        printf ("irred2\n");
    10821099        if (isRat)
    10831100          On (SW_RATIONAL);
     
    11091126          if (factors.length() == 2 && factors.getLast().exp() == 1)
    11101127          {
     1128            out_cf ("Fp2= ", Fp, "\n");
     1129            printf ("tdeg= %d\n", tdeg);
     1130            printf ("totaldegree (Fp)= %d\n", totaldegree (Fp));
     1131            printf ("degree (Fp, 1)= %d\n", degree (Fp,1));
     1132            printf ("degree (Fp,2)= %d\n", degree (Fp,2));
     1133            printf ("degree (F,1)= %d\n", degree (F,1));
     1134            printf ("degree (F,2)= %d\n", degree (F,2));
     1135            out_cf ("factors.getFirst()= ", factors.getFirst().factor(), "\n");
     1136            printf ("char= %d\n", getCharacteristic ());
     1137            printf ("irred3\n");
    11111138            if (isRat)
    11121139              On (SW_RATIONAL);
Note: See TracChangeset for help on using the changeset viewer.