Changeset 31bb7a in git


Ignore:
Timestamp:
Mar 5, 2014, 1:50:28 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
82b7491e748b809bc43f85275bfee6b0730617cd
Parents:
2870a4e7395476e8d13fc3a927547d301dc5918b
git-author:
Martin Lee <martinlee84@web.de>2014-03-05 13:50:28+01:00
git-committer:
Martin Lee <martinlee84@web.de>2014-03-06 11:04:14+01:00
Message:
chg: use NTL/FLINT also in operator /=
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/canonicalform.cc

    r2870a4 r31bb7a  
    676676        value = value->mulcoeff( cf.value );
    677677    else  if ( value->level() == cf.value->level() ) {
     678#if (HAVE_NTL && HAVE_FLINT && __FLINT_VERSION_MINOR >= 4)
    678679        if (value->levelcoeff() == cf.value->levelcoeff() && cf.isUnivariate() && (*this).isUnivariate())
    679680        {
     
    685686        else if (value->levelcoeff() == cf.value->levelcoeff() && (!cf.isUnivariate() || !(*this).isUnivariate()))
    686687            value = value->mulsame( cf.value );
     688#else
     689        if ( value->levelcoeff() == cf.value->levelcoeff() )
     690            value = value->mulsame( cf.value );
     691#endif
    687692        else  if ( value->levelcoeff() > cf.value->levelcoeff() )
    688693            value = value->mulcoeff( cf.value );
     
    725730        value = value->dividecoeff( cf.value, false );
    726731    else  if ( value->level() == cf.value->level() ) {
    727         if ( value->levelcoeff() == cf.value->levelcoeff() )
     732#if (HAVE_NTL && HAVE_FLINT && __FLINT_VERSION_MINOR >= 4)
     733        if ( value->levelcoeff() == cf.value->levelcoeff() && (*this).isUnivariate() && cf.isUnivariate())
     734        {
     735            if (value->level() < 0 || CFFactory::gettype() == GaloisFieldDomain)
     736              value = value->dividesame( cf.value );
     737            else
     738              *this= divNTL (*this, cf);
     739        }
     740        else if (value->levelcoeff() == cf.value->levelcoeff() && (!cf.isUnivariate() || !(*this).isUnivariate()))
    728741            value = value->dividesame( cf.value );
     742#else
     743        if (value->levelcoeff() == cf.value->levelcoeff() )
     744            value = value->dividesame( cf.value );
     745#endif
    729746        else  if ( value->levelcoeff() > cf.value->levelcoeff() )
    730747            value = value->dividecoeff( cf.value, false );
Note: See TracChangeset for help on using the changeset viewer.