Changeset 1b8e048 in git


Ignore:
Timestamp:
Apr 5, 2011, 1:23:42 PM (13 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3a4bc649f1d0185cc9f8b122bd75f21f75ac9c9a')
Children:
dd80471ad40e2c17828a9b1e6ea8114e3d8a8c76
Parents:
0fb5d0c7780acf58819ceb6dd096be46e796f106
Message:
bug fix in hensel lifting


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

Legend:

Unmodified
Added
Removed
  • factory/facHensel.cc

    r0fb5d0c r1b8e048  
    17661766  if (degBuf0 > 0 && degBuf1 > 0)
    17671767  {
    1768     while (one.exp() > j) one++;
    1769     while (two.exp() > j) two++;
     1768    while (one.hasTerms() && one.exp() > j) one++;
     1769    while (two.hasTerms() && two.exp() > j) two++;
    17701770    for (k= 1; k <= (int) ceil (j/2.0); k++)
    17711771    {
     
    17951795        tmp[0] += M (k + 1, 1);
    17961796    }
    1797 
     1797  }
     1798
     1799  if (degBuf0 >= j + 1 && degBuf1 >= j + 1)
     1800  {
    17981801    if (j + 2 <= M.rows())
    1799     {
    1800       if (degBuf0 >= j + 1 && degBuf1 >= j + 1)
    1801         tmp [0] += mulNTL ((bufFactors [0] [j + 1]+ bufFactors [0] [0]),
    1802                            (bufFactors [1] [j + 1] + bufFactors [1] [0]))
    1803                            - M(1,1) - M (j + 2,1);
    1804       else if (degBuf0 >= j + 1)
    1805         tmp[0] += mulNTL (bufFactors [0] [j+1], bufFactors [1] [0]);
    1806       else if (degBuf1 >= j + 1)
    1807         tmp[0] += mulNTL (bufFactors [0] [0], bufFactors [1] [j + 1]);
    1808     }
    1809   }
     1802      tmp [0] += mulNTL ((bufFactors [0] [j + 1]+ bufFactors [0] [0]),
     1803                         (bufFactors [1] [j + 1] + bufFactors [1] [0]))
     1804                         - M(1,1) - M (j + 2,1);
     1805  }
     1806  else if (degBuf0 >= j + 1)
     1807  {
     1808    if (degBuf1 > 0)
     1809      tmp[0] += mulNTL (bufFactors [0] [j+1], bufFactors [1] [0]);
     1810    else
     1811      tmp[0] += mulNTL (bufFactors [0] [j+1], bufFactors [1]);
     1812  }
     1813  else if (degBuf1 >= j + 1)
     1814  {
     1815    if (degBuf0 > 0)
     1816      tmp[0] += mulNTL (bufFactors [0] [0], bufFactors [1] [j + 1]);
     1817    else
     1818      tmp[0] += mulNTL (bufFactors [0], bufFactors [1] [j + 1]);
     1819  }
     1820
    18101821  Pi [0] += tmp[0]*xToJ*F.mvar();
    18111822
     
    21692180  CanonicalForm uIZeroJ;
    21702181
    2171     if (degBuf0 > 0 && degBuf1 > 0)
    2172       uIZeroJ= mulMod (bufFactors[0] [0], buf[1], MOD) +
    2173                mulMod (bufFactors[1] [0], buf[0], MOD);
    2174     else if (degBuf0 > 0)
    2175       uIZeroJ= mulMod (buf[0], bufFactors[1], MOD);
    2176     else if (degBuf1 > 0)
    2177       uIZeroJ= mulMod (bufFactors[0], buf[1], MOD);
    2178     else
    2179       uIZeroJ= 0;
    2180     Pi [0] += xToJ*uIZeroJ;
     2182  if (degBuf0 > 0 && degBuf1 > 0)
     2183    uIZeroJ= mulMod (bufFactors[0] [0], buf[1], MOD) +
     2184             mulMod (bufFactors[1] [0], buf[0], MOD);
     2185  else if (degBuf0 > 0)
     2186    uIZeroJ= mulMod (buf[0], bufFactors[1], MOD);
     2187  else if (degBuf1 > 0)
     2188    uIZeroJ= mulMod (bufFactors[0], buf[1], MOD);
     2189  else
     2190    uIZeroJ= 0;
     2191  Pi [0] += xToJ*uIZeroJ;
    21812192
    21822193  CFArray tmp= CFArray (factors.length() - 1);
     
    21882199  if (degBuf0 > 0 && degBuf1 > 0)
    21892200  {
    2190     while (one.exp() > j) one++;
    2191     while (two.exp() > j) two++;
     2201    while (one.hasTerms() && one.exp() > j) one++;
     2202    while (two.hasTerms() && two.exp() > j) two++;
    21922203    for (k= 1; k <= (int) ceil (j/2.0); k++)
    21932204    {
     
    22202231      }
    22212232    }
    2222 
     2233  }
     2234
     2235  if (degBuf0 >= j + 1 && degBuf1 >= j + 1)
     2236  {
    22232237    if (j + 2 <= M.rows())
    2224     {
    2225       if (degBuf0 >= j + 1 && degBuf1 >= j + 1)
    2226         tmp [0] += mulMod ((bufFactors [0] [j + 1]+ bufFactors [0] [0]),
    2227                            (bufFactors [1] [j + 1] + bufFactors [1] [0]), MOD)
    2228                    - M(1,1) - M (j + 2,1);
    2229       else if (degBuf0 >= j + 1)
    2230         tmp[0] += mulMod (bufFactors [0] [j+1], bufFactors [1] [0], MOD);
    2231       else if (degBuf1 >= j + 1)
    2232         tmp[0] += mulMod (bufFactors [0] [0], bufFactors [1] [j + 1], MOD);
    2233     }
     2238      tmp [0] += mulMod ((bufFactors [0] [j + 1]+ bufFactors [0] [0]),
     2239                         (bufFactors [1] [j + 1] + bufFactors [1] [0]), MOD)
     2240                         - M(1,1) - M (j + 2,1);
     2241  }
     2242  else if (degBuf0 >= j + 1)
     2243  {
     2244    if (degBuf1 > 0)
     2245      tmp[0] += mulMod (bufFactors [0] [j+1], bufFactors [1] [0], MOD);
     2246    else
     2247      tmp[0] += mulMod (bufFactors [0] [j+1], bufFactors [1], MOD);
     2248  }
     2249  else if (degBuf1 >= j + 1)
     2250  {
     2251    if (degBuf0 > 0)
     2252      tmp[0] += mulMod (bufFactors [0] [0], bufFactors [1] [j + 1], MOD);
     2253    else
     2254      tmp[0] += mulMod (bufFactors [0], bufFactors [1] [j + 1], MOD);
    22342255  }
    22352256  Pi [0] += tmp[0]*xToJ*F.mvar();
Note: See TracChangeset for help on using the changeset viewer.