Changeset 1b38b23 in git


Ignore:
Timestamp:
Jul 15, 2010, 1:30:23 PM (13 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
5046ce577e8d17d17d4ae4e6b0d19f1fa941849c
Parents:
d56cdae01f2cd4bd0d5e6cf03bbe3672345b236d
Message:
bug fix (old ticket #200 and new bug report by Martin Albrecht as of July 14, 2010) by Anne und Frank

git-svn-id: file:///usr/local/Singular/svn/trunk@13012 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/kbuckets.cc

    rd56cda r1b38b23  
    11031103  number rn;
    11041104
     1105  /* we shall reduce bucket=bn*lm+... by p1=an*t+a1 where t=lm(p1)
     1106     and an,bn shall be defined further down only if lc(p1)!=1
     1107     we already know: an|bn and t|lm */
    11051108  if(a1==NULL)
    11061109  {
     
    11141117//StringSetS("##### an = "); nWrite(an); PrintS(StringAppend("\n"));
    11151118//StringSetS("##### bn = "); nWrite(bn); PrintS(StringAppend("\n"));
     1119    /* ksCheckCoeff: divide out gcd from an and bn: */
    11161120    int ct = ksCheckCoeff(&an, &bn);
     1121    /* the previous command returns ct=0 or ct=2 iff an!=1
     1122       note: an is now 1 or -1 */
     1123
     1124    /* setup factor for p1 which cancels leading terms */
    11171125    p_SetCoeff(lm, bn, bucket->bucket_ring);
    11181126    if ((ct == 0) || (ct == 2))
    11191127    {
    1120       kBucket_Mult_n(bucket, an);
    1121 #ifdef HAVE_RINGS
    1122       if (rField_is_Ring(bucket->bucket_ring))
    1123         lm = p_Mult_nn(lm, an, bucket->bucket_ring);
    1124 #endif
     1128      /* next line used to be here before but is WRONG:
     1129      kBucket_Mult_n(bucket, an);
     1130        its use would result in a wrong sign for the tail of bucket
     1131        in the reduction */
     1132
     1133      /* correct factor for cancelation by changing sign if an=-1 */
     1134      lm = p_Mult_nn(lm, an, bucket->bucket_ring);
    11251135    }
    11261136    rn = an;
     
    11621172  }
    11631173  #endif
     1174
    11641175  kBucket_Minus_m_Mult_p(bucket, lm, a1, &l1, spNoether);
    11651176
Note: See TracChangeset for help on using the changeset viewer.