Changeset 2b855d1 in git for factory


Ignore:
Timestamp:
Sep 22, 2020, 12:17:21 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
43e965942ed162dbfe28732ca08d97ea1c3af395
Parents:
96113da0c61c4c2fa7cd9360008b7bc558c1c7fa
Message:
fix: always add const. factor add the beginning
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factor.cc

    r96113d r2b855d1  
    118118        if (e!=0)
    119119        {
    120           printf("*v(%d)",l);
     120          printf("*%c",'a'+l-1);
    121121          if (e!=1) printf("^%d",e);
    122122        }
     
    561561      {
    562562        F=CFFList(CFFactor(fz,1));
     563        F.insert(CFFactor(ic,1));
    563564      }
    564565      else
     
    759760
    760761        //make monic
    761         f1=f1 / LeadCoeff(f1);
     762        f1=f1 / leadcoeff; //leadcoeff==LeadCoeff(f1);
    762763
    763764        // factorize
     
    774775#if !defined(HAVE_NTL) && !defined(HAVE_FLINT)
    775776      // char p, extension, univariate
    776       F=FpFactorizeUnivariateCZ( f, false, 1, alpha, Variable() );
     777      CanonicalForm c=Lc(f);
     778      CanonicalForm fc=f/c;
     779      F=FpFactorizeUnivariateCZ( fc, false, 1, alpha, Variable() );
     780      F.insert (CFFactor (c, 1));
    777781#endif
    778782    }
Note: See TracChangeset for help on using the changeset viewer.