Changeset b94a72 in git for kernel/GBEngine/kstd2.cc


Ignore:
Timestamp:
Apr 24, 2020, 6:38:31 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
8e903f23324de1e4ec1dc9926b6de0a16de605d6
Parents:
5f544e3856e15c729d9cd4aeb0a80d2c613f4be2
Message:
fix: Tst/Long/primdecint.tst, Tst/New/stdZtests.tst
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kstd2.cc

    r5f544e rb94a72  
    105105      {
    106106        gcd = n_Gcd(pGetCoeff(p), pGetCoeff(T[j].p), r->cf);
    107         if (o == -1 ||
    108             n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf) == TRUE) {
     107        if (o == -1
     108        || n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf))
     109        {
    109110          ogcd = gcd;
    110111          o = j;
     
    125126      {
    126127        gcd = n_Gcd(pGetCoeff(p), pGetCoeff(T[j].p), r->cf);
    127         if (o == -1 ||
    128             n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf) == TRUE) {
     128        if (o == -1
     129        || n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf))
     130        {
    129131          ogcd = gcd;
    130132          o = j;
     
    157159        {
    158160            mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    159             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     161            if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     162            {
    160163                return 0;
    161164            }
     
    165168        {
    166169            mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    167             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     170            if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     171            {
    168172                return 0;
    169173            }
     
    182186        {
    183187            mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    184             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     188            if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     189            {
    185190                return 0;
    186191            }
     
    190195        {
    191196            mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    192             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     197            if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     198            {
    193199                return 0;
    194200            }
     
    223229      {
    224230        mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf);
    225         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     231        if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     232        {
    226233          o = j;
    227234          orest = rest;
     
    232239      {
    233240        mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf);
    234         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     241        if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     242        {
    235243          o = j;
    236244          orest = rest;
     
    254262      {
    255263        mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf);
    256         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     264        if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     265        {
    257266          o = j;
    258267          orest = rest;
     
    263272      {
    264273        mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf);
    265         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) {
     274        if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     275        {
    266276          o = j;
    267277          orest = rest;
     
    648658    /* check if a reducer of the lead term exists */
    649659    j = kFindDivisibleByInT(strat, h);
    650     if (j < 0) {
     660    if (j < 0)
     661    {
    651662      /* check if a reducer with the same lead monomial exists */
    652663      j = kFindSameLMInT_Z(strat, h);
    653       if (j < 0) {
     664      if (j < 0)
     665      {
    654666        /* check if a reducer of the lead monomial exists, by the above
    655667         * check this is a real divisor of the lead monomial */
     
    683695          }
    684696        }
    685         else
    686         {
     697        else
     698        {
    687699          /* not(lc(reducer) | lc(poly)) && not(lc(poly) | lc(reducer))
    688700           * => we try to cut down the lead coefficient at least */
     
    713725        ksReducePolyZ(h, &(strat->T[j]), NULL, NULL, strat);
    714726        ksReducePolyGCD(&h2, &(strat->T[j]), NULL, NULL, strat);
    715         if (!rHasLocalOrMixedOrdering(currRing)) {
     727        if (!rHasLocalOrMixedOrdering(currRing))
     728        {
    716729          redtailBbaAlsoLC_Z(&h2, j, strat);
    717730          h2.pCleardenom();
     
    43504363/* shiftgb stuff */
    43514364#ifdef HAVE_SHIFTBBA
    4352 
    4353 
    43544365ideal bbaShift(ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat)
    43554366{
     
    45084519      // therefore we call pCleardenom instead of pNorm
    45094520      strat->redTailChange=FALSE;
    4510      
     4521
    45114522      /* if we are computing over Z we always want to try and cut down
    45124523       * the coefficients in the tail terms */
    4513       if (rField_is_Z(currRing) && !rHasLocalOrMixedOrdering(currRing)) {
     4524      if (rField_is_Z(currRing) && !rHasLocalOrMixedOrdering(currRing))
     4525      {
    45144526        redtailBbaAlsoLC_Z(&(strat->P), strat->tl, strat);
    45154527        strat->P.pCleardenom();
     
    46304642          if (pLmShortDivisibleBy(strat->T[j].p, strat->sevT[j], strat->S[k], ~strat->sevS[k]))
    46314643          {
    4632             if (pLmCmp(strat->T[j].p, strat->S[k]) != 0) { // check whether LM is different
     4644            if (pLmCmp(strat->T[j].p, strat->S[k]) != 0)
     4645            { // check whether LM is different
    46334646              deleteInS(k, strat);
    46344647              --k;
     
    47104723  return (strat->Shdl);
    47114724}
     4725#endif
    47124726
    47134727#ifdef HAVE_SHIFTBBA
     
    47274741* element in t with respect to the given pDivisibleBy
    47284742*/
     4743#ifdef HAVE_SHIFTBBA
    47294744int redFirstShift (LObject* h,kStrategy strat)
    47304745{
Note: See TracChangeset for help on using the changeset viewer.