Changeset 8cbdd9 in git for libpolys


Ignore:
Timestamp:
Dec 4, 2018, 3:50:09 PM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4bd32dfef92ec9f5ed8dceee82d14318ae147107')
Children:
5161f3c439dd28c1bc0dd5d9a4aa7ae701a0a64d
Parents:
653af74c248d3b0a930cbaab22d3123faf777c29
git-author:
Karim Abou Zeid <karim23697@gmail.com>2018-12-04 15:50:09+01:00
git-committer:
Karim Abou Zeid <karim23697@gmail.com>2018-12-07 15:25:20+01:00
Message:
Fix multiplication error
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/shiftop.cc

    r653af74 r8cbdd9  
    506506  PrintLn(); WriteLPExpV(m2ExpV, ri);
    507507#endif
    508   if (m1Length + m2Length > ri->N)
    509   {
     508  int last = m1Length + m2Length;
     509  if (last > ri->N)
     510  {
     511    last = ri->N;
    510512    WarnS("letterplace degree bound too low for this multiplication");
    511513  }
    512   for (int i = 1 + m1Length; i < 1 + m1Length + m2Length; ++i)
     514  for (int i = 1 + m1Length; i < 1 + last; ++i)
    513515  {
    514516    assume(m2ExpV[i - m1Length] <= 1);
     
    531533  PrintLn(); WriteLPExpV(m2ExpV, ri);
    532534#endif
    533   if (m1Length + m2Length > ri->N)
    534   {
     535  int last = m1Length + m2Length;
     536  if (last > ri->N)
     537  {
     538    last = ri->N;
    535539    WarnS("letterplace degree bound too low for this multiplication");
    536540  }
    537541
    538542  // shift m1 by m2Length
    539   for (int i = m2Length + m1Length; i >= 1 + m2Length; --i)
     543  for (int i = last; i >= 1 + m2Length; --i)
    540544  {
    541545    m1ExpV[i] = m1ExpV[i - m2Length];
Note: See TracChangeset for help on using the changeset viewer.