Changeset 633196 in git


Ignore:
Timestamp:
Jun 11, 2015, 4:10:16 PM (8 years ago)
Author:
Stephan Oberfranz <oberfran@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
d52203afadb18a3c05d4c08a2bc18bc327690cd9
Parents:
760258751f1fefe8bd1155f774a95487b0df36f420c1a357575a4f15b08754d8cab675b51b6d79b0
Message:
Merge branch 'spielwiese' of github.com:oberfran/Sources into spielwiese
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/standard.lib

    r20c1a3 r633196  
    804804"SYNTAX: @code{groebner (} ideal_expression @code{)} @*
    805805         @code{groebner (} module_expression @code{)} @*
    806          @code{groebner (} ideal_expression@code{,} int_expression @code{)} @*
    807          @code{groebner (} module_expression@code{,} int_expression @code{)} @*
    808806         @code{groebner (} ideal_expression@code{,} list of string_expressions
    809807               @code{)} @*
    810808         @code{groebner (} ideal_expression@code{,} list of string_expressions
    811                and int_expression @code{)} @*
    812          @code{groebner (} ideal_expression@code{,} int_expression @code{)}
     809               and int_expression @code{)}
    813810TYPE:    type of the first argument
    814811PURPOSE: computes a standard basis of the first argument @code{I}
     
    829826         afterwards back).
    830827         @code{option(prot)} informs about the chosen method.
    831 NOTE:    If an additional argument, say @code{wait}, of type int is given,
    832          then the computation runs for at most @code{wait} seconds.
    833          That is, if no result could be computed in @code{wait} seconds,
    834          then the computation is interrupted, 0 is returned, a warning
    835          message is displayed, and the global variable
    836          @code{Standard::groebner_error} is defined.
    837          This feature uses MP and hence it is available on UNIX platforms, only.
    838828HINT:    Since there exists no uniform best method for computing standard
    839829         bases, and since the difference in performance of a method on
     
    843833         parameters/variables by integers, etc.). @*
    844834SEE ALSO: stdhilb, stdfglm, std, slimgb
    845 KEYWORDS: time limit on computations; MP, groebner basis computations
     835KEYWORDS: groebner basis computations
    846836EXAMPLE: example groebner;  shows an example"
    847837
     
    904894  for (k=1; k<=size(#); k++)
    905895  {
    906      if (typeof(#[k]) == "int")
    907      {
    908        int wait = #[k];
    909      }
    910896     if (typeof(#[k]) == "string")
    911897     {
     
    914900     }
    915901  }
    916 
    917  //======= we have an argument of type int -- try to use MPfork links =======
    918   if ( defined(wait) == voice )
    919   {
    920     if ( system("with", "MP") )
    921     {
    922         int j = 10;
    923         string bs = nameof(basering);
    924         link l_fork = "MPtcp:fork";
    925         open(l_fork);
    926         write(l_fork, quote(system("pid")));
    927         int pid = read(l_fork);
    928 //        write(l_fork, quote(groebner(eval(i))));
    929         write(l_fork, quote(groebner(eval(i),eval(Method))));
    930 //###Fehlermeldung:
    931 // ***dError: undef. ringorder used
    932 // occured at:
    933 
    934         // sleep in small intervalls for appr. one second
    935         if (wait > 0)
    936         {
    937           while(j < 1000000)
    938           {
    939             if (status(l_fork, "read", "ready", j)) {break;}
    940             j = j + j;
    941           }
    942         }
    943 
    944         // sleep in intervalls of one second from now on
    945         j = 1;
    946         while (j < wait)
    947         {
    948           if (status(l_fork, "read", "ready", 1000000)) {break;}
    949           j = j + 1;
    950         }
    951 
    952         if (status(l_fork, "read", "ready"))
    953         {
    954           def result = read(l_fork);
    955           if (bs != nameof(basering))
    956           {
    957             def PP = basering;
    958             setring P;
    959             def result = imap(PP, result);
    960             kill PP;
    961           }
    962           if (defined(groebner_error)==1)
    963           {
    964             kill groebner_error;
    965           }
    966           kill l_fork;
    967         }
    968         else
    969         {
    970           ideal result;
    971           if (! defined(groebner_error))
    972           {
    973             int groebner_error = 1;
    974             export groebner_error;
    975           }
    976           "** groebner did not finish";
    977           j = system("sh", "kill " + string(pid));
    978         }
    979         return (result);
    980     }
    981     else
    982     {
    983       "** groebner with a time limit on computation is not supported
    984           in this configuration";
    985     }
    986   }
    987 
    988  //=========== we are still here -- do the actual computation =============
    989902
    990903//--------------------- save data from basering ---------------------------
     
    1065978  if( find(method,"hilb") && !find(method,"fglm") )
    1066979  {
    1067      conversion = "hilb"; // $Id$
     980     conversion = "hilb";
    1068981  }
    1069982  if( find(method,"fglm") && !find(method,"hilb") )
    1070983  {
    1071     conversion = "fglm"; // $Id$
     984    conversion = "fglm";
    1072985  }
    1073986  if( find(method,"fglm") && find(method,"hilb") )
    1074987  {
    1075     conversion = "hilborfglm"; // $Id$
     988    conversion = "hilborfglm";
    1076989  }
    1077990  if( !find(method,"fglm") && !find(method,"hilb") )
    1078991  {
    1079     conversion = "no"; // $Id$
     992    conversion = "no";
    1080993  }
    1081994
     
    25322445static proc mod_init()
    25332446{
     2447  if(!defined(Singmathic))
     2448  {
     2449    load("singmathic.so","try");
     2450  }
    25342451  //int pagelength=24;
    25352452  //exportto(Top,pagelength);
  • Singular/dyn_modules/singmathic/Makefile.am

    r20c1a3 r633196  
    2020singmathic_la_SOURCES  = singmathic.cc
    2121singmathic_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
    22 singmathic_la_LDFLAGS  = ${P_PROCS_MODULE_LDFLAGS}
     22singmathic_la_LDFLAGS  = ${P_PROCS_MODULE_LDFLAGS} ${MATHIC_LIBS}
    2323
    2424# AM_COLOR_TESTS=always
  • Singular/iparith.cc

    r20c1a3 r633196  
    53415341  WerrorS_dummy_cnt=0;
    53425342  BOOLEAN bo=jjLOAD(s,TRUE);
    5343   if (bo || (WerrorS_dummy_cnt>0)) Print("loading of >%s< failed\n",s);
     5343  if (TEST_OPT_PROT && (bo || (WerrorS_dummy_cnt>0)))
     5344    Print("loading of >%s< failed\n",s);
    53445345  WerrorS_callback=WerrorS_save;
    53455346  errorreported=0;
  • Singular/iplib.cc

    r20c1a3 r633196  
    10921092    Werror("dynl_open failed:%s", dynl_error());
    10931093    Werror("%s not found", newlib);
     1094    killhdl2(pl,&(basePack->idroot),NULL); // remove package
    10941095    goto load_modules_end;
    10951096  }
     
    11191120      RET=FALSE;
    11201121    }
    1121     else Werror("mod_init not found:: %s\nThis is probably not a dynamic module for Singular!\n", dynl_error());
     1122    else
     1123    {
     1124      Werror("mod_init not found:: %s\nThis is probably not a dynamic module for Singular!\n", dynl_error());
     1125      killhdl2(pl,&(basePack->idroot),NULL); // remove package
     1126    }
    11221127  }
    11231128
  • Singular/maps_ip.cc

    r20c1a3 r633196  
    264264
    265265      number d = n_GetDenom(p_GetCoeff(p, currRing), currRing);
    266       p_Test((poly)NUM(d), R);
     266      p_Test((poly)NUM((fraction)d), R);
    267267
    268268      if ( n_IsOne (d, currRing->cf) )
     
    270270        n_Delete(&d, currRing); d = NULL;
    271271      }
    272       else if (!p_IsConstant((poly)NUM(d), R))
     272       else if (!p_IsConstant((poly)NUM((fraction)d), R))
    273273      {
    274274        WarnS("ignoring denominators of coefficients...");
     
    279279      memset(&tmpW,0,sizeof(sleftv));
    280280      tmpW.rtyp = POLY_CMD;
    281       p_Test((poly)NUM(num), R);
    282 
    283       tmpW.data = NUM (num); // a copy of this poly will be used
    284 
    285       p_Normalize(NUM(num),R);
     281      p_Test((poly)NUM((fraction)num), R);
     282
     283      tmpW.data = NUM ((fraction)num); // a copy of this poly will be used
     284
     285      p_Normalize(NUM((fraction)num),R);
    286286      if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,R,NULL,NULL,0,nMap))
    287287      {
  • Singular/walk.cc

    r760258 r633196  
    806806  for(i=nG-1; i>=0; i--)
    807807  {
    808     mi = MpolyInitialForm(G->m[i], iv);
    809     gi = G->m[i];
    810 
     808    mi = pHead(MpolyInitialForm(G->m[i], iv));
     809    //Print("\n **// test_w_in_ConeCC: lm(initial)= %s \n",pString(mi));
     810    gi = pHead(G->m[i]);
     811    //Print("\n **// test_w_in_ConeCC: lm(ideal)= %s \n",pString(gi));
    811812    if(mi == NULL)
    812813    {
     
    16461647    (* result)[i] = mpz_get_si(pert_vector[i]);
    16471648  }
    1648 
     1649/*
    16491650  j = 0;
    1650   for(i=0; i<nV; i++)
     1651  for(i=0; i<niv; i++)
    16511652  {
    16521653    (* result1)[i] = mpz_get_si(pert_vector[i]);
     
    16581659    }
    16591660  }
    1660   if(j > nV - 1)
     1661  if(j > niv - 1)
    16611662  {
    16621663    // Print("\n//  MfPertwalk: geaenderter vector gleich Null! \n");
     
    16641665    goto CHECK_OVERFLOW;
    16651666  }
    1666 
     1667/*
    16671668// check that the perturbed weight vector lies in the Groebner cone
     1669  Print("\n========================================\n//** MfPertvector: test in Cone.\n");
    16681670  if(test_w_in_ConeCC(G,result1) != 0)
    16691671  {
     
    16811683    // Print("\n// Mfpertwalk: geaenderter vector liegt nicht in Groebnerkegel! \n");
    16821684  }
    1683 
     1685  Print("\n ========================================\n");*/
    16841686  CHECK_OVERFLOW:
    16851687
     
    50435045  Set_Error(FALSE);
    50445046  Overflow_Error = FALSE;
    5045   BOOLEAN endwalks = FALSE;
     5047  //BOOLEAN endwalks = FALSE;
    50465048#ifdef TIME_TEST
    50475049  clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0;
     
    50575059  ring newRing;
    50585060  ring XXRing = baseRing;
     5061  ring targetRing;
    50595062  intvec* ivNull = new intvec(nV);
    50605063  intvec* curr_weight = new intvec(nV);
     
    50655068  for(i=0; i<nV; i++)
    50665069  {
    5067     (*tmp_weight)[i] = (*target_M)[i];
     5070    (*tmp_weight)[i] = (*orig_M)[i];
    50685071  }
    50695072*/
     
    50905093  }
    50915094//#endif
     5095
     5096  if(target_M->length() == nV)
     5097  {
     5098   // define the target ring
     5099    targetRing = VMrDefault(target_weight);
     5100  }
     5101  else
     5102  {
     5103    targetRing = VMatrDefault(target_M);
     5104  }
     5105  if(orig_M->length() == nV)
     5106  {
     5107    // define a new ring with ordering "(a(curr_weight),lp)
     5108    newRing = VMrDefault(curr_weight);
     5109  }
     5110  else
     5111  {
     5112    newRing = VMatrDefault(orig_M);
     5113  }
     5114  rChangeCurrRing(newRing);
     5115
    50925116#ifdef TIME_TEST
    50935117  to = clock();
    50945118#endif
    5095   if(orig_M->length() == nV)
    5096   {
    5097     // define a new ring with ordering "(a(curr_weight),lp)
    5098     newRing = VMrDefault(curr_weight);
    5099   }
    5100   else
    5101   {
    5102     newRing = VMatrDefault(orig_M);
    5103   }
    5104   rChangeCurrRing(newRing);
     5119
    51055120  ideal G = MstdCC(idrMoveR(Go,baseRing,currRing));
    5106   //ideal G = idrMoveR(Go,baseRing,currRing);
    5107   baseRing = currRing;
     5121
    51085122#ifdef TIME_TEST
    51095123  tostd = clock()-to;
    51105124#endif
    51115125
     5126  baseRing = currRing;
    51125127  nwalk = 0;
     5128
    51135129  while(1)
    51145130  {
    51155131    nwalk ++;
    51165132    nstep ++;
     5133
    51175134#ifdef TIME_TEST
    51185135    to = clock();
    51195136#endif
    5120 //#ifdef CHECK_IDEAL_MWALK
    5121     if(printout > 2)
    5122     {
    5123       idString(G,"//** Mwalk: G");
    5124     }
    5125 //#endif
    5126     // test whether target cone is reached
    5127     if(reduction !=0 && test_w_in_ConeCC(G,target_weight) == 1)
    5128     {
    5129       endwalks = TRUE;
    5130     }
    51315137    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    51325138    Gomega = MwalkInitialForm(G, curr_weight);
    51335139#ifdef TIME_TEST
    5134     //time for computing initial form ideal
    51355140    tif = tif + clock()-to;
    51365141#endif
     5142
    51375143//#ifdef CHECK_IDEAL_MWALK
    51385144    if(printout > 1)
     
    51415147    }
    51425148//#endif
     5149
    51435150    if(reduction == 0)
    51445151    {
    5145       //PrintS("\n//** Mwalk: test middle of cone!\n");
    51465152      FF = middleOfCone(G,Gomega);
    5147       //PrintS("\n//** Mwalk: Test F!\n");
    51485153      if( FF != NULL)
    51495154      {
     
    51515156        G = idCopy(FF);
    51525157        idDelete(&FF);
    5153         //PrintS("\n//** Mwalk: FF nicht NULL! Compue next vector.\n");
    51545158        goto NEXT_VECTOR;
    51555159      }
    51565160    }
     5161
    51575162#ifndef  BUCHBERGER_ALG
    51585163    if(isNolVector(curr_weight) == 0)
     
    51655170    }
    51665171#endif
     5172
    51675173    if(nwalk == 1)
    51685174    {
     
    51815187     if(target_M->length() == nV)
    51825188     {
    5183        //define a new ring with ordering "(a(curr_weight),Wp(target_weight))"
    5184        newRing = VMrRefine(curr_weight,target_weight);
     5189       //define a new ring with ordering "(a(curr_weight),lp)"
     5190       newRing = VMrDefault(curr_weight);
    51855191     }
    51865192     else
     
    52255231    // where Gomega is a reduced Groebner basis w.r.t. the current ring
    52265232    F = MLifttwoIdeal(Gomega2, M1, G);
     5233
    52275234#ifdef TIME_TEST
    52285235    tlift = tlift + clock() - to;
     
    52365243    idDelete(&Gomega2);
    52375244    idDelete(&M1);
     5245
    52385246    rChangeCurrRing(newRing); // change the ring to newRing
    52395247    G = idrMoveR(F,baseRing,currRing);
    52405248    idDelete(&F);
     5249    idSkipZeroes(G);
     5250
     5251//#ifdef CHECK_IDEAL_MWALK
     5252    if(printout > 2)
     5253    {
     5254      idString(G, "//** Mwalk: G");
     5255    }
     5256//#endif
     5257
     5258    rChangeCurrRing(targetRing);
     5259    G = idrMoveR(G,newRing,currRing);
     5260    // test whether target cone is reached
     5261    if(reduction !=0 && test_w_in_ConeCC(G,curr_weight) == 1)
     5262    {
     5263      baseRing = currRing;
     5264      break;
     5265      //endwalks = TRUE;
     5266    }
     5267
     5268    rChangeCurrRing(newRing);
     5269    G = idrMoveR(G,targetRing,currRing);
    52415270    baseRing = currRing;
     5271
     5272/*
    52425273#ifdef TIME_TEST
    52435274    to = clock();
     
    52475278    tstd = tstd + clock() - to;
    52485279#endif
    5249     idSkipZeroes(G);
    5250 //#ifdef CHECK_IDEAL_MWALK
    5251     if(printout > 2)
    5252     {
    5253       idString(G, "//** Mwalk: G");
    5254     }
    5255 //#endif
     5280*/
     5281
     5282
    52565283#ifdef TIME_TEST
    52575284    to = clock();
     
    52685295    }
    52695296//#endif
    5270     if(MivComp(target_weight,curr_weight) == 1 || endwalks == TRUE)
    5271     {
    5272 
     5297    if(MivComp(target_weight,curr_weight) == 1)// || endwalks == TRUE)
     5298    {/*
    52735299//#ifdef CHECK_IDEAL_MWALK
    52745300      if(printout > 0)
     
    53285354      to = clock();
    53295355#endif
    5330       /*PrintS("\n //**Mwalk: Interreduce");
     5356      //PrintS("\n //**Mwalk: Interreduce");
    53315357      //interreduce the Groebner basis <G> w.r.t. currRing
    5332       G = kInterRedCC(G,NULL);*/
     5358      //G = kInterRedCC(G,NULL);
    53335359#ifdef TIME_TEST
    53345360      tred = tred + clock() - to;
    53355361#endif
    53365362      idSkipZeroes(G);
    5337       delete next_weight;
     5363      delete next_weight; */
    53385364      break;
    53395365    }
     
    53485374  rChangeCurrRing(XXRing);
    53495375  ideal result = idrMoveR(G,baseRing,currRing);
     5376  idDelete(&Go);
    53505377  idDelete(&G);
    53515378  //delete tmp_weight;
     
    53765403  Set_Error(FALSE);
    53775404  Overflow_Error = FALSE;
    5378   BOOLEAN endwalks = FALSE;
     5405  //BOOLEAN endwalks = FALSE;
    53795406#ifdef TIME_TEST
    53805407  clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0;
     
    53895416  ideal Gomega, M, F,FF, Gomega1, Gomega2, M1;
    53905417  ring newRing;
     5418  ring targetRing;
    53915419  ring baseRing = currRing;
    53925420  ring XXRing = currRing;
     
    54225450  to = clock();
    54235451#endif
     5452
     5453  if(target_M->length() == nV)
     5454  {
     5455   // define the target ring
     5456    targetRing = VMrDefault(target_weight);
     5457  }
     5458  else
     5459  {
     5460    targetRing = VMatrDefault(target_M);
     5461  }
    54245462  if(orig_M->length() == nV)
    54255463  {
     
    54455483    to = clock();
    54465484#endif
    5447 //#ifdef CHECK_IDEAL_MWALK
    5448     if(printout > 2)
    5449     {
    5450       idString(G,"//** Mrwalk: G");
    5451     }
    5452 //#endif
     5485
    54535486    Gomega = MwalkInitialForm(G, curr_weight); // compute an initial form ideal of <G> w.r.t. "curr_vector"
    54545487    //polylength = 1 if there is a polynomial in Gomega with at least 3 monomials and 0 otherwise
     
    54645497//#endif
    54655498    // test whether target cone is reached
    5466     if(test_w_in_ConeCC(G,target_weight) == 1)
     5499/*    if(test_w_in_ConeCC(G,target_weight) == 1)
    54675500    {
    54685501      endwalks = TRUE;
    5469     }
     5502    }*/
    54705503    if(reduction == 0)
    54715504    {
    5472       //PrintS("\n//** Mrwalk: test middle of cone!\n");
     5505     
    54735506      FF = middleOfCone(G,Gomega);
    5474       //PrintS("\n//** Mrwalk: Test F!\n");
     5507     
    54755508      if(FF != NULL)
    54765509      {
     
    54785511        G = idCopy(FF);
    54795512        idDelete(&FF);
    5480         //PrintS("\n//** Mrwalk: FF nicht NULL! Compue next vector.\n");
     5513       
    54815514        goto NEXT_VECTOR;
    54825515      }
     
    55075540     if(target_M->length() == nV)
    55085541     {
    5509        newRing = VMrRefine(curr_weight,target_weight); //define a new ring with ordering "(a(curr_weight),Wp(target_weight))"
     5542       newRing = VMrDefault(curr_weight); // define a new ring with ordering "(a(curr_weight),lp)
     5543       //newRing = VMrRefine(curr_weight,target_weight); //define a new ring with ordering "(a(curr_weight),Wp(target_weight))"
    55105544     }
    55115545     else
     
    55755609    }
    55765610//#endif
     5611
     5612    rChangeCurrRing(targetRing);
     5613    G = idrMoveR(G,newRing,currRing);
     5614    // test whether target cone is reached
     5615    if(reduction !=0 && test_w_in_ConeCC(G,curr_weight) == 1)
     5616    {
     5617      baseRing = currRing;
     5618      break;
     5619    }
     5620
     5621    rChangeCurrRing(newRing);
     5622    G = idrMoveR(G,targetRing,currRing);
     5623    baseRing = currRing;
     5624
     5625
    55775626    NEXT_VECTOR:
    55785627#ifdef TIME_TEST
     
    55965645    }
    55975646//#endif
    5598     if(MivComp(next_weight, ivNull) == 1 || MivComp(target_weight,curr_weight) == 1 || endwalks == TRUE)
    5599     {
     5647    if(MivComp(next_weight, ivNull) == 1 || MivComp(target_weight,curr_weight) == 1)// || endwalks == TRUE)
     5648    {/*
    56005649//#ifdef CHECK_IDEAL_MWALK
    56015650      if(printout > 0)
     
    56555704      to = clock();
    56565705#endif
    5657       /*PrintS("\n //**Mrwalk: Interreduce");
     5706      //PrintS("\n //**Mrwalk: Interreduce");
    56585707      //interreduce the Groebner basis <G> w.r.t. currRing
    5659       G = kInterRedCC(G,NULL);*/
     5708      //G = kInterRedCC(G,NULL);
    56605709#ifdef TIME_TEST
    56615710      tred = tred + clock() - to;
    56625711#endif
    56635712      idSkipZeroes(G);
    5664       delete next_weight;
     5713      delete next_weight;*/
    56655714      break;
    56665715    }
     
    67246773{
    67256774  Overflow_Error =  FALSE;
    6726   //Print("\n\n// Entering the %d-th recursion:", nlev);
    6727 
     6775  if(printout >0)
     6776  {
     6777    Print("\n\n// Entering the %d-th recursion:", nlev);
     6778  }
    67286779  int i, nV = currRing->N;
    67296780  ring new_ring, testring;
     
    67936844    // We only perturb the current target vector at the recursion level 1
    67946845    if(Xngleich == 0 && nlev == 1) //(ngleich == 0) important, e.g. ex2, ex3
    6795       if (MivComp(next_vect, omega2) != 1)
     6846      if (MivComp(next_vect, omega2) == 1)
    67966847      {
    67976848        // to dispense with taking initial (and lifting/interreducing
     
    68486899        to=clock();
    68496900
    6850         /* to avoid the value of Overflow_Error that occur in Mfpertvector*/
     6901        // to avoid the value of Overflow_Error that occur in Mfpertvector
    68516902        Overflow_Error = FALSE;
    6852 
    68536903        next_vect = MkInterRedNextWeight(omega,omega2,G);
    68546904        xtnw=xtnw+clock()-to;
     
    68626912//#endif
    68636913
    6864     /* check whether the the computed vector is in the correct cone */
    6865     /* If no, the reduced GB of an omega-homogeneous ideal will be
    6866        computed by Buchberger algorithm and stop this recursion step*/
    6867     //if(test_w_in_ConeCC(G, next_vect) != 1) //e.g. Example s7, cyc6
    6868     if(Overflow_Error == TRUE)
     6914    // check whether the the computed vector is in the correct cone.
     6915    // If no, compute the reduced Groebner basis of an omega-homogeneous
     6916    // ideal with Buchberger's algorithm and stop this recursion step
     6917    if(Overflow_Error == TRUE || test_w_in_ConeCC(G, next_vect) != 1)  //e.g. Example s7, cyc6
    68696918    {
    68706919      delete next_vect;
     
    68866935      if(printout > 0)
    68876936      {
    6888         Print("\n//** rec_fractal_call: Overflow. Applying Buchberger's algorithm in ring r = %s;",
     6937        Print("\n//** rec_fractal_call: Applying Buchberger's algorithm in ring r = %s;",
    68896938              rString(currRing));
    68906939      }
     
    69056954
    69066955      nnflow ++;
    6907 
    69086956      Overflow_Error = FALSE;
    69096957      return (G1);
    6910     }//end overflow-check
     6958    }
    69116959
    69126960
     
    69516999        if(printout > 0)
    69527000        {
    6953           Print("\n//** rec_fractal_call: Wrong cone. Tau' doesn't stay in the correct cone.\n");
     7001          Print("\n//** rec_fractal_call: Wrong cone. Tau doesn't stay in the correct cone.\n");
    69547002        }
    6955 /*
     7003
    69567004#ifndef  MSTDCC_FRACTAL
    69577005        intvec* Xtautmp;
     
    69907038        goto NEXT_VECTOR_FRACTAL;
    69917039#endif
    6992 */
     7040
    69937041      FRACTAL_MSTDCC:
    69947042        if(printout > 0)
     
    70637111
    70647112    to=clock();
    7065     /* Take the initial form of <G> w.r.t. omega */
     7113    // Take the initial form of <G> w.r.t. omega
    70667114    Gomega = MwalkInitialForm(G, omega);
    70677115    xtif=xtif+clock()-to;
     
    70737121    if(reduction == 0)
    70747122    {
    7075       /* Check whether the intermediate weight vector lies in the interior of the cone.
    7076        * If so, only perform reductions. Otherwise apply Buchberger's algorithm. */
     7123      // Check whether the intermediate weight vector lies in the interior of the cone.
     7124      // If so, only perform reductions. Otherwise apply Buchberger's algorithm.
    70777125      FF = middleOfCone(G,Gomega);
    70787126      if( FF != NULL)
     
    70817129        G = idCopy(FF);
    70827130        idDelete(&FF);
    7083         /* Compue next vector. */
     7131        // Compue next vector.
    70847132        goto NEXT_VECTOR_FRACTAL;
    70857133      }
     
    71587206    G = idrMoveR(F,oRing,currRing);
    71597207    to=clock();
    7160     /* Interreduce G */
    7161    // G = kInterRedCC(F1, NULL);
     7208    // Interreduce G
     7209    // G = kInterRedCC(F1, NULL);
    71627210    xtred=xtred+clock()-to;
    71637211    //idDelete(&F1);
     
    72397287    if(polylength > 0 && G->m[0] != NULL)
    72407288    {
    7241       /*
    7242       there is a polynomial in Gomega with at least 3 monomials,
    7243       low-dimensional facet of the cone
    7244       */
     7289     
     7290      PrintS("\n**// rec_r_fractal_call: there is a polynomial in Gomega with at least 3 monomials, low-dimensional facet of the cone.\n");
     7291     
    72457292      delete next_vect;
    72467293      next_vect = MWalkRandomNextWeight(G,omega,omega2,weight_rad,nlev);
     
    73247371        if(G->m[0] != NULL && polylength > 0)
    73257372        {
    7326           /*
    7327           there is a polynomial in Gomega with at least 3 monomials,
    7328           low-dimensional facet of the cone
    7329           */
     7373         
     7374          PrintS("//** rec_r_fractal_call: there is a polynomial in Gomega with at least 3 monomials, low-dimensional facet of the cone");
     7375         
    73307376          delete next_vect;
    73317377          next_vect = MWalkRandomNextWeight(G,omega,omega2,weight_rad,nlev);
     
    73497395       computed by Buchberger algorithm and stop this recursion step*/
    73507396    //if(test_w_in_ConeCC(G, next_vect) != 1) //e.g. Example s7, cyc6
    7351     if(Overflow_Error == TRUE)
     7397    if(Overflow_Error == TRUE || test_w_in_ConeCC(G,next_vect) != 1)
    73527398    {
    73537399      delete next_vect;
  • Tst/Manual/breakpoint.res.gz.uu

    r20c1a3 r633196  
    11begin 640 breakpoint.res.gz
    2 M'XL("(4YR5,``V)R96%K<&]I;G0N<F5S`'7000N"0!`%X+N_XB$=5C!),Q.$
    3 M/407(;K8/12'6)(UW(GZ^:U1IF"G7?;-^V"G..WS(X!0XI#OX++AH%&5F\'>
    4 MSDHK%E[F]">D1-51>;VU2G.@Z1$8+MDI/D(TCL6E:ZG2U-GR[Q6ACY+1*$U(
    5 MXQ1*XSLW,.M9QD>X3:96]+-L-FO%?ZQE.*',N(R:&F*JQ>J9>(.TD>]]]!^^
    6 .&V'K"^<%^NY1DCH!````
     2M'XL("$+R=E4``V)R96%K<&]I;G0N<F5S`'7000N"0!`%X+N_XB$=5C!IM4P0
     3M/$07(;K8/12'6)(UW(GZ^:U1IF"G7?;-^V"G..WS(P"9X9#OX++AH%&5F\+>
     4MSDHK%E[J]">R#%5'Y?76*LV!ID=@N&2G^`CA.!:7KJ5*4V?+OU=('R6C49J0
     5M1`F4QG=N8*)9QH?<QE,K_%DVF[76?ZREG%!F7$9-#3'58O6,O4':9.]]]!^^
     6.&V'K"^<%/$@GQSH!````
    77`
    88end
  • libpolys/polys/clapconv.cc

    r20c1a3 r633196  
    297297
    298298    // test if denominator is constant
    299     if (!p_IsConstantPoly(DEN (p_GetCoeff (p,r)),r->cf->extRing) && !errorreported)
     299    if (!p_IsConstantPoly(DEN ((fraction)p_GetCoeff (p,r)),r->cf->extRing) && !errorreported)
    300300      WerrorS("conversion error: denominator!= 1");
    301301
    302     CanonicalForm term=convSingPFactoryP(NUM (p_GetCoeff(p, r)),r->cf->extRing);
     302    CanonicalForm term=convSingPFactoryP(NUM ((fraction)p_GetCoeff(p, r)),r->cf->extRing);
    303303
    304304    // if denominator is not NULL it should be a constant at this point
    305     if (DEN (p_GetCoeff(p,r)) != NULL)
    306     {
    307       CanonicalForm den= convSingPFactoryP(DEN (p_GetCoeff(p, r)),r->cf->extRing);
     305    if (DEN ((fraction)p_GetCoeff(p,r)) != NULL)
     306    {
     307      CanonicalForm den= convSingPFactoryP(DEN ((fraction)p_GetCoeff(p, r)),r->cf->extRing);
    308308      if (rChar (r) == 0)
    309309        On (SW_RATIONAL);
  • libpolys/polys/ext_fields/transext.cc

    r20c1a3 r633196  
    14551455    //PrintS(" den=");p_wrp(DEN(a),ntRing);PrintLn();
    14561456    definiteGcdCancellation(a, cf, FALSE);
    1457     if ((DEN(a)!=NULL)
    1458     &&(!n_GreaterZero(pGetCoeff(DEN(a)),ntCoeffs)))
    1459     {
    1460       NUM(a)=p_Neg(NUM(a),ntRing);
    1461       DEN(a)=p_Neg(DEN(a),ntRing);
     1457    fraction f=(fraction)a;
     1458    if ((DEN(f)!=NULL)
     1459    &&(!n_GreaterZero(pGetCoeff(DEN(f)),ntCoeffs)))
     1460    {
     1461      NUM(f)=p_Neg(NUM(f),ntRing);
     1462      DEN(f)=p_Neg(DEN(f),ntRing);
     1463      a=(number)f;
    14621464    }
    14631465  }
     
    23202322    }
    23212323
    2322     NUM(c) = p_Mult_nn(NUM(c), d, R);
     2324    NUM((fraction)c) = p_Mult_nn(NUM((fraction)c), d, R);
    23232325    n_Delete(&d, Q);
    23242326  }
  • libpolys/polys/ext_fields/transext.h

    r20c1a3 r633196  
    7373
    7474
    75 #define NUM(f) (((fraction)f)->numerator)
    76 #define DEN(f) (((fraction)f)->denominator)
     75#define NUM(f) ((f)->numerator)
     76#define DEN(f) ((f)->denominator)
    7777
    7878/* some useful accessors for fractions: */
  • libpolys/polys/monomials/p_polys.cc

    r20c1a3 r633196  
    38413841    assume( !IS0(z) );
    38423842
    3843     zz = NUM(z);
     3843    zz = NUM((fraction)z);
    38443844    p_Test (zz, srcExtRing);
    38453845
    38463846    if( zz == NULL ) return NULL;
    3847     if( !DENIS1(z) )
    3848     {
    3849       if (p_IsConstant(DEN(z),srcExtRing))
    3850       {
    3851         number n=pGetCoeff(DEN(z));
     3847    if( !DENIS1((fraction)z) )
     3848    {
     3849      if (p_IsConstant(DEN((fraction)z),srcExtRing))
     3850      {
     3851        number n=pGetCoeff(DEN((fraction)z));
    38523852        zz=p_Div_nn(zz,n,srcExtRing);
    38533853        p_Normalize(zz,srcExtRing);
     
    40114011                 pcn = (poly) c;
    40124012               else //            nCoeff_is_transExt(C)
    4013                  pcn = NUM(c);
     4013                 pcn = NUM((fraction)c);
    40144014
    40154015              if (pNext(pcn) == NULL) // c->z
  • m4/mathic-check.m4

    r20c1a3 r633196  
    1414 dnl Checking these pre-requisites and adding them to libs is necessary
    1515 dnl for some reason, at least on Cygwin.
     16 BACKUP_LIBS=${LIBS}
    1617 AS_IF( [test "x$with_mathicgb" = xyes],
    1718 [
     
    2526  AC_CHECK_HEADER([mathicgb.h])
    2627  AC_LANG_POP([C++])
     28  MATHIC_LIBS=${LIBS}
     29  LIBS=${BACKUP_LIBS}
     30  AC_SUBST(MATHIC_LIBS)
    2731  AC_DEFINE(HAVE_MATHICGB,1,[Define if mathicgb is to be used])
    2832#  AC_SUBST(HAVE_MATHICGB_VALUE, 1)
  • resources/omFindExec.c

    r20c1a3 r633196  
    126126        strcat (tbuf, name);
    127127
    128         /* If we can execute the named file, then return it. */
    129         if (! access (tbuf, X_OK))
     128        /* If the named file exists, then return it. */
     129        if (! access (tbuf, F_OK))
    130130        {
    131131#ifdef WINNT
Note: See TracChangeset for help on using the changeset viewer.