Changeset 4a7e5c in git


Ignore:
Timestamp:
Aug 27, 2012, 10:53:58 AM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
935632e9d66d12abe5da2483364feb9f4f1266ef
Parents:
0facdca6b24379ab6fa4c490c0c6105b9f0e8c45
git-author:
Martin Lee <martinlee84@web.de>2012-08-27 10:53:58+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-04 18:01:19+02:00
Message:
fix: do not use cf_prepgcd
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    r0facdc r4a7e5c  
    3636
    3737static CanonicalForm cf_content ( const CanonicalForm &, const CanonicalForm & );
    38 static void cf_prepgcd( const CanonicalForm &, const CanonicalForm &, int &, int &, int & );
    3938
    4039void out_cf(const char *s1,const CanonicalForm &f,const char *s2);
     
    697696{
    698697  CanonicalForm fc, gc, d1;
    699   int mp, cc, p1, pe;
    700   mp = f.level()+1;
    701698  bool fc_isUnivariate=f.isUnivariate();
    702699  bool gc_isUnivariate=g.isUnivariate();
    703700  bool fc_and_gc_Univariate=fc_isUnivariate && gc_isUnivariate;
    704   cf_prepgcd( f, g, cc, p1, pe);
    705   if ( cc != 0 )
    706   {
    707     if ( cc > 0 )
    708     {
    709       fc = replacevar( f, Variable(cc), Variable(mp) );
    710       gc = g;
    711     }
    712     else
    713     {
    714       fc = replacevar( g, Variable(-cc), Variable(mp) );
    715       gc = f;
    716     }
    717     return cf_content( fc, gc );
    718   }
    719 // now each appearing variable is in f and g
    720701  fc = f;
    721702  gc = g;
     
    739720    else
    740721    #endif
    741     if ( p1 == fc.level() )
    742       fc = gcd_poly_p( fc, gc );
    743     else
    744     {
    745       fc = replacevar( fc, Variable(p1), Variable(mp) );
    746       gc = replacevar( gc, Variable(p1), Variable(mp) );
    747       fc = replacevar( gcd_poly_p( fc, gc ), Variable(mp), Variable(p1) );
    748     }
     722    fc = gcd_poly_p( fc, gc );
    749723  }
    750724  else if (!fc_and_gc_Univariate)
    751725  {
    752726    if ( isOn( SW_USE_EZGCD ) )
    753     {
    754727      fc= ezgcd (fc, gc);
    755       /*if ( pe == 1 )
    756         fc = ezgcd( fc, gc );
    757       else if ( pe > 0 )// no variable at position 1
    758       {
    759         fc = replacevar( fc, Variable(pe), Variable(1) );
    760         gc = replacevar( gc, Variable(pe), Variable(1) );
    761         fc = replacevar( ezgcd( fc, gc ), Variable(1), Variable(pe) );
    762       }
    763       else
    764       {
    765         pe = -pe;
    766         fc = swapvar( fc, Variable(pe), Variable(1) );
    767         gc = swapvar( gc, Variable(pe), Variable(1) );
    768         fc = swapvar( ezgcd( fc, gc ), Variable(1), Variable(pe) );
    769       }*/
    770     }
    771     else if (
    772     isOn(SW_USE_CHINREM_GCD)
    773     && (isPurePoly_m(fc)) && (isPurePoly_m(gc))
    774     )
    775     {
    776     #if 0
    777       if ( p1 == fc.level() )
    778         fc = chinrem_gcd( fc, gc );
    779       else
    780       {
    781         fc = replacevar( fc, Variable(p1), Variable(mp) );
    782         gc = replacevar( gc, Variable(p1), Variable(mp) );
    783         fc = replacevar( chinrem_gcd( fc, gc ), Variable(mp), Variable(p1) );
    784       }
    785     #else
     728    else if (isOn(SW_USE_CHINREM_GCD))
    786729      fc = chinrem_gcd( fc, gc);
    787     #endif
    788     }
    789730    else
    790731    {
     
    11001041*    p1 in "gcd_poly1"
    11011042*/
    1102 static
     1043/*static
    11031044void optvalues ( const int * df, const int * dg, const int n, int & p1, int &pe )
    11041045{
     
    11301071        i--;
    11311072    }
    1132 }
     1073}*/
    11331074
    11341075/*
    11351076*  make some changes of variables, see optvalues
    11361077*/
    1137 static void
     1078/*static void
    11381079cf_prepgcd( const CanonicalForm & f, const CanonicalForm & g, int & cc, int & p1, int &pe )
    11391080{
     
    11821123    delete [] degsf;
    11831124    delete [] degsg;
    1184 }
     1125}*/
    11851126
    11861127
Note: See TracChangeset for help on using the changeset viewer.