Changeset 070c1b4 in git for libfac/factor/Factor.cc


Ignore:
Timestamp:
Jul 9, 2012, 1:54:06 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
16055bd66cbe17a643cdc139b5ad13307053b068
Parents:
9e472371c48294d093be833766189740f0ddd8f0
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-07-09 13:54:06+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-08-03 10:03:18+02:00
Message:
fix: error about choosing field extensions (Tst/Short/bug_charseries2)

update version in libfac and factory
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfac/factor/Factor.cc

    r9e47237 r070c1b4  
    2727
    2828#include "alg_factor.h"
    29 void out_cf(char *s1,const CanonicalForm &f,char *s2);
     29void out_cf(const char *s1,const CanonicalForm &f,const char *s2);
    3030void out_cff(CFFList &L);
    3131
     
    6262  else
    6363  {
    64     bool repl=(f.mvar() != alpha);
    6564    //out_cf("f2 - factor:",f,"\n");
    6665    //out_cf("f2 - ext:",alpha,"\n");
     
    6867    Variable X=rootOf(mipo);
    6968    CanonicalForm F=f;
    70     if (repl) F=replacevar(f,alpha,X);
     69    F=replacevar(f,alpha,X);
    7170    //out_cf("call - factor:",F,"\n");
    7271    //out_cf("call - ext:",X,"\n");
     
    7473    CFFList L=factorize(F,X);
    7574    CFFListIterator i=L;
    76     if (repl)
    7775    {
    7876      CFFList Outputlist;
     
    8381        i.getItem().exp()));
    8482      }
     83      //out_cff(Outputlist);
    8584      return Outputlist;
    8685    }
    87     else return L;
    8886  }
    8987}
     
    466464
    467465static int
    468 specializePoly(const CanonicalForm & f, Variable & Extension, int deg, SFormList & Substitutionlist, int i,int j){
     466specializePoly(const CanonicalForm & f, Variable & Extension, int deg, SFormList & Substitutionlist, int i,int j)
     467{
    469468  Variable minpoly= Extension;
    470469  int ok,extended= degree(Extension), working_over_extension;
     
    475474  // First try:
    476475  ok = try_specializePoly(f,minpoly,deg,Substitutionlist,i,j);
    477   while ( ! ok ){ // we have to extend!
     476  while ( ! ok ) // we have to extend!
     477  {
     478    SFormList origS=Substitutionlist;
    478479    extended+= 1;
    479     if ( ! working_over_extension ){
     480    if ( ! working_over_extension )
     481    {
    480482      minpoly= rootOf(generate_mipo( extended,Extension ));
    481483      Extension= minpoly;
    482484      ok= try_specializePoly(f,minpoly,deg,Substitutionlist,i,j);
     485      if (!ok)
     486      {
     487        Substitutionlist=origS;
     488        // very bad hack: TODO
     489        // we want to remove the newly created variable minpoly:
     490        extern char *var_names_ext;
     491        var_names_ext[strlen(var_names_ext)]='\0';
     492      }
    483493    }
    484494    else
Note: See TracChangeset for help on using the changeset viewer.