Changeset 109e385 in git for kernel


Ignore:
Timestamp:
Jul 7, 2015, 11:15:36 AM (9 years ago)
Author:
Adi Popescu <adi_popescum@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
ae0188e380f485df33ffbd07d75eaca52206add7
Parents:
3ffb5ca871047be87892fe8263ef80dbf59f2f04
Message:
fix: redMoraNF
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kstd1.cc

    r3ffb5ca r109e385  
    743743      if (H.p==NULL) return NULL;
    744744    }
    745     if (p_LmShortDivisibleBy(strat->T[j].GetLmTailRing(), strat->sevT[j], H.GetLmTailRing(), not_sev, strat->tailRing))
     745    #if ADIDEBUG_NF
     746    printf("\nSearching for a reducer...\n");
     747    #endif
     748    if (p_LmShortDivisibleBy(strat->T[j].GetLmTailRing(), strat->sevT[j], H.GetLmTailRing(), not_sev, strat->tailRing)
     749        #ifdef HAVE_RINGS
     750        && (!rField_is_Ring(strat->tailRing) ||
     751            n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing))
     752        #endif
     753        )
    746754    {
    747755      /*- remember the found T-poly -*/
     
    750758      int li = strat->T[j].length;
    751759      int ii = j;
     760      #if ADIDEBUG_NF
     761      printf("\nFound: j = %i, ecart = %i\nTrying to find a better one...\n",j,ei);pWrite(strat->T[j].p);
     762      #endif
    752763      /*
    753764      * the polynomial to reduce with (up to the moment) is;
     
    762773        if (ei <= H.ecart) break;
    763774        if (((strat->T[j].ecart < ei)
    764           || ((strat->T[j].ecart == ei) && (strat->T[j].length < li)))
    765         && pLmShortDivisibleBy(strat->T[j].p,strat->sevT[j], H.p, not_sev))
     775          || ((strat->T[j].ecart == ei)
     776        && (strat->T[j].length < li)))
     777        && pLmShortDivisibleBy(strat->T[j].p,strat->sevT[j], H.p, not_sev)
     778        #ifdef HAVE_RINGS
     779        && (!rField_is_Ring(strat->tailRing) ||
     780            n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing))
     781        #endif
     782        )
    766783        {
    767784          /*
     
    772789          li = strat->T[j].length;
    773790          ii = j;
     791          #if ADIDEBUG_NF
     792          printf("\nFound a better one: j = %i, ecart = %i\nTrying to find a better one...\n",j,ei);
     793          pWrite(strat->T[j].p);
     794          #endif
    774795        }
    775796      }
     
    802823          return NULL;
    803824      }
     825      #if ADIDEBUG_NF
     826      printf("\nAfter the small reduction it looks like this:\n");pWrite(H.p);
     827      getchar();
     828      #endif
    804829      /*- try to reduce the s-polynomial -*/
    805830      o = H.SetpFDeg();
Note: See TracChangeset for help on using the changeset viewer.