Changeset 21b8f4c in git for factory/facFqBivar.cc


Ignore:
Timestamp:
Jul 25, 2011, 4:08:17 PM (13 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
3dd0640ba1b8ca0d5fc4aa74c81faaa7eb5129fc
Parents:
64a5014602570d17e143cbe6e31d19fd6a86cfc3
Message:
added new fdivides which also returns the quotient in case of divisibility
replaced old fdivides where possible


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

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r64a501 r21b8f4c  
    274274
    275275  CFList result;
    276   CanonicalForm buf, buf2;
     276  CanonicalForm buf, buf2, quot;
    277277
    278278  buf= F;
     
    334334          S.removeFirst();
    335335          g /= content (g, Variable (1));
    336           if (fdivides (g, buf))
     336          if (fdivides (g, buf, quot))
    337337          {
    338338            buf2= g (y - eval, y);
     
    343343              if (degree (buf2, alpha) < degMipoBeta)
    344344              {
    345                 buf /= g;
     345                buf= quot;
    346346                LCBuf= LC (buf, Variable (1));
    347347                recombination= true;
     
    354354              if (!isInExtension (buf2, gamma, k, delta, source, dest))
    355355              {
    356                 buf /= g;
     356                buf= quot;
    357357                LCBuf= LC (buf, Variable (1));
    358358                recombination= true;
     
    461461  CFList result;
    462462  CanonicalForm LCBuf= LC (F, Variable (1));
    463   CanonicalForm g, buf= F;
     463  CanonicalForm g, quot, buf= F;
    464464  int * v= new int [T.length()];
    465465  for (int i= 0; i < T.length(); i++)
     
    512512          S.removeFirst();
    513513          g /= content (g, Variable (1));
    514           if (fdivides (g, buf))
     514
     515          if (fdivides (g, buf, quot))
    515516          {
    516517            recombination= true;
    517518            result.append (g);
    518             buf /= g;
     519            buf= quot;
    519520            LCBuf= LC (buf, Variable(1));
    520521            T= Difference (T, S);
     
    628629  CanonicalForm buf= F;
    629630  CanonicalForm LCBuf= LC (buf, Variable (1));
    630   CanonicalForm g;
     631  CanonicalForm g, quot;
    631632  CanonicalForm M= power (F.mvar(), deg);
    632633  adaptedLiftBound= 0;
     
    645646        g= mulMod2 (i.getItem(), LCBuf, M);
    646647        g /= content (g, Variable (1));
    647         if (fdivides (g, buf))
     648        if (fdivides (g, buf, quot))
    648649        {
    649650          result.append (g);
    650           buf /= g;
     651          buf= quot;
    651652          d -= degree (g) + degree (LC (g, Variable (1)));
    652653          LCBuf= LC (buf, Variable (1));
     
    703704  if (!k && beta.level() != 1)
    704705    degMipoBeta= degree (getMipo (beta));
     706  CanonicalForm quot;
    705707  for (CFListIterator i= factors; i.hasItem(); i++)
    706708  {
     
    716718        g= mulMod2 (i.getItem(), LCBuf, M);
    717719        g /= content (g, Variable (1));
    718         if (fdivides (g, buf))
     720        if (fdivides (g, buf, quot))
    719721        {
    720722          buf2= g (y - eval, y);
     
    726728            {
    727729              appendTestMapDown (result, buf2, info, source, dest);
    728               buf /= g;
     730              buf= quot;
    729731              d -= degree (g) + degree (LC (g, Variable (1)));
    730732              LCBuf= LC (buf, Variable (1));
     
    737739            {
    738740              appendTestMapDown (result, buf2, info, source, dest);
    739               buf /= g;
     741              buf= quot;
    740742              d -= degree (g) + degree (LC (g, Variable (1)));
    741743              LCBuf= LC (buf, Variable (1));
     
    959961  Variable x= Variable (1);
    960962  CanonicalForm yToL= power (y, liftBound);
     963  CanonicalForm quot;
    961964  for (long i= 1; i <= N.NumCols(); i++)
    962965  {
     
    987990    buf= mod (buf, yToL);
    988991    buf /= content (buf, x);
    989     if (fdivides (buf, F))
     992    if (fdivides (buf, F, quot))
    990993    {
    991994      factorsFoundIndex[i - 1]= 1;
    992995      factorsFound++;
    993       F /= buf;
     996      F= quot;
    994997      F /= Lc (F);
    995998      reconstructedFactors.append (buf);
     
    10131016  Variable y= Variable (2);
    10141017  Variable x= Variable (1);
     1018  CanonicalForm quot;
    10151019  CanonicalForm yToL= power (y, liftBound);
    10161020  for (long i= 1; i <= N.NumCols(); i++)
     
    10421046    buf= mod (buf, yToL);
    10431047    buf /= content (buf, x);
    1044     if (fdivides (buf, F))
     1048    if (fdivides (buf, F, quot))
    10451049    {
    10461050      factorsFoundIndex[i - 1]= 1;
    10471051      factorsFound++;
    1048       F /= buf;
     1052      F= quot;
    10491053      F /= Lc (F);
    10501054      reconstructedFactors.append (buf);
     
    10691073  CanonicalForm F= G;
    10701074  CanonicalForm yToL= power (y, precision);
     1075  CanonicalForm quot;
    10711076  CFList result;
    10721077  CFList bufFactors= factors;
     
    10901095    buf= mod (buf, yToL);
    10911096    buf /= content (buf, x);
    1092     if (fdivides (buf, F))
    1093     {
    1094       F /= buf;
     1097    if (fdivides (buf, F, quot))
     1098    {
     1099      F= quot;
    10951100      F /= Lc (F);
    10961101      result.append (buf);
     
    11181123  CanonicalForm F= G;
    11191124  CanonicalForm yToL= power (y, precision);
     1125  CanonicalForm quot;
    11201126  CFList result;
    11211127  CFList bufFactors= factors;
     
    11401146    buf= mod (buf, yToL);
    11411147    buf /= content (buf, x);
    1142     if (fdivides (buf, F))
    1143     {
    1144       F /= buf;
     1148    if (fdivides (buf, F, quot))
     1149    {
     1150      F= quot;
    11451151      F /= Lc (F);
    11461152      result.append (buf2);
     
    11771183  CFList bufFactors= factors;
    11781184  CFList factorsConsidered;
    1179   CanonicalForm buf2;
     1185  CanonicalForm buf2, quot;
    11801186  for (long i= 1; i <= N.NumCols(); i++)
    11811187  {
     
    12011207      if (degree (buf2, alpha) < 1)
    12021208      {
    1203         if (fdivides (buf, F))
    1204         {
    1205           F /= buf;
     1209        if (fdivides (buf, F, quot))
     1210        {
     1211          F= quot;
    12061212          F /= Lc (F);
    12071213          result.append (buf2);
     
    12161222      if (!isInExtension (buf2, gamma, k, delta, source, dest))
    12171223      {
    1218         if (fdivides (buf, F))
    1219         {
    1220           F /= buf;
     1224        if (fdivides (buf, F, quot))
     1225        {
     1226          F= quot;
    12211227          F /= Lc (F);
    12221228          result.append (buf2);
     
    12451251  CanonicalForm F= G;
    12461252  CanonicalForm yToL= power (y, precision);
     1253  CanonicalForm quot;
    12471254  CFList result;
    12481255  CFList bufFactors= factors;
     
    12661273    buf= mod (buf, yToL);
    12671274    buf /= content (buf, x);
    1268     if (fdivides (buf, F))
    1269     {
    1270       F /= buf;
     1275    if (fdivides (buf, F, quot))
     1276    {
     1277      F= quot;
    12711278      F /= Lc (F);
    12721279      result.append (buf);
     
    13001307  CanonicalForm delta= info.getDelta();
    13011308  CanonicalForm yToL= power (y, liftBound);
     1309  CanonicalForm quot;
    13021310  CFList source, dest;
    13031311  for (long i= 1; i <= N.NumCols(); i++)
     
    13351343      if (degree (buf2, alpha) < 1)
    13361344      {
    1337         if (fdivides (buf, F))
     1345        if (fdivides (buf, F, quot))
    13381346        {
    13391347          factorsFoundIndex[i - 1]= 1;
    13401348          factorsFound++;
    1341           F /= buf;
     1349          F= quot;
    13421350          F /= Lc (F);
    13431351          buf2= mapDown (buf2, info, source, dest);
     
    13511359      if (!isInExtension (buf2, gamma, k, delta, source, dest))
    13521360      {
    1353         if (fdivides (buf, F))
     1361        if (fdivides (buf, F, quot))
    13541362        {
    13551363          factorsFoundIndex[i - 1]= 1;
    13561364          factorsFound++;
    1357           F /= buf;
     1365          F= quot;
    13581366          F /= Lc (F);
    13591367          buf2= mapDown (buf2, info, source, dest);
Note: See TracChangeset for help on using the changeset viewer.