Changeset f831299 in git


Ignore:
Timestamp:
Nov 24, 2011, 5:25:22 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
48afda8604dc4572d40ecc987b43779dd42606d4
Parents:
ec2602c1b3d7f1425acc9f7584d48ac345dc7097af117a9cf0cc4842d683c9fd2c6e68a1b5b48d9d
Message:
Merge pull request #23 from steenpass/tests

changes to Singular test-suite: 
1. incompatibility with old Singular (better & consistent output) is declared to be a feature - not a bug!
2. new test: non-normalized output from zero_decomp (primdec.lib)
Files:
3 added
9 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    raf117a rf831299  
    1111doc/
    1212MOD
     13libsingular-config
    1314factory/readcf.cc
    1415factory/ylwrap
     
    8788omalloc/omExternalConfig.h
    8889omalloc/omlimits.h
     90omalloc/omConfig.h.in
    8991doc/NTL
    9092factory/factory.h
  • Singular/extra.cc

    raf117a rf831299  
    984984  Werror("Sorry: not yet re-factored: see libpolys/polys/clapsing.cc");
    985985  return FALSE;
    986 #else   
    987         if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))
     986#else
     987        if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))
    988988        {
    989989          res->rtyp=STRING_CMD;
     
    993993        else
    994994          WerrorS("ideal expected");
    995 #endif 
     995#endif
    996996      }
    997997      else
     
    24092409          p_DebugPrint((poly)h->Data(), currRing);
    24102410#  else
    2411           Warn("Sorry: not available for release build!");
     2411          Warn("Sorry: not available for release build!");
    24122412#  endif
    24132413          return FALSE;
     
    24202420          rDebugPrint((ring)h->Data());
    24212421#  else
    2422           Warn("Sorry: not available for release build!");
     2422          Warn("Sorry: not available for release build!");
    24232423#  endif
    24242424          return FALSE;
     
    37663766        extern int fanID;
    37673767        res->rtyp=fanID;
    3768         res->data=(void*)(grfan(I,heuristic,FALSE));
     3768        res->data=(void*)(grfan(I,heuristic,FALSE));
    37693769      #endif
    37703770      return FALSE;
     
    37893789  else
    37903790#endif
    3791     if (strcmp(sys_cmd,"denom_list")==0)
    3792       {
    3793         res->rtyp=LIST_CMD;
    3794         extern lists get_denom_list();
    3795         res->data=(lists)get_denom_list();
    3796         return FALSE;
    3797       }
     3791  if (strcmp(sys_cmd,"denom_list")==0)
     3792  {
     3793    res->rtyp=LIST_CMD;
     3794    extern lists get_denom_list();
     3795    res->data=(lists)get_denom_list();
     3796    return FALSE;
     3797  }
     3798  else
    37983799/*==================== Error =================*/
    37993800      Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented );
  • Singular/walk.cc

    raf117a rf831299  
    3131
    3232//#define TIME_TEST // print the used time of each subroutine
    33 //#define ENDWALKS //print the size of the last omega-homogenoues Gröbner basis
     33//#define ENDWALKS //print the size of the last omega-homogenoues Grï¿œbner basis
    3434
    3535/* includes */
     
    18151815  int i, nv = currRing->N;
    18161816
    1817   r->cf->ch  = rChar (currRing);
     1817  r->cf  = currRing->cf;
    18181818  r->N   = currRing->N;
    18191819  int nb = rBlocks(currRing) + 1;//31.10.01 (+1)
     
    18861886  int i, nv = currRing->N;
    18871887
    1888   r->cf->ch  = rChar (currRing);
     1888  r->cf  = currRing->cf;
    18891889  r->N   = currRing->N;
    18901890  int nb = rBlocks(currRing) + 1;//31.10.01 (+1)
     
    20352035
    20362036
    2037   r->cf->ch  = rChar (currRing);
     2037  r->cf  = currRing->cf;
    20382038  r->N   = currRing->N;
    20392039  int nb = rBlocks(currRing) + 1;//31.10.01 (+1)
     
    32723272
    32733273/* The main procedur Mfwalk calls the recursive Subroutine
    3274    rec_fractal_call to compute the wanted Gröbner basis.
    3275    At the main procedur we compute the reduced Gröbner basis w.r.t. a "fast"
     3274   rec_fractal_call to compute the wanted Grï¿œbner basis.
     3275   At the main procedur we compute the reduced Grï¿œbner basis w.r.t. a "fast"
    32763276   order, e.g. "dp" and a sequence of weight vectors which are row vectors
    32773277   of a matrix. This matrix defines the given monomial order, e.g. "lp"
     
    35613561
    35623562/* 08.09.02 */
    3563 /******** THE NEW GRÖBNER WALK ALGORITHM **********/
    3564 /* Gröbnerwalk with a recursive "second" alternative GW, REC_GB_Mwalk
     3563/******** THE NEW GRï¿œBNER WALK ALGORITHM **********/
     3564/* Grï¿œbnerwalk with a recursive "second" alternative GW, REC_GB_Mwalk
    35653565   that only computes the last reduced GB */
    35663566ideal Mwalk(ideal Go, intvec* curr_weight, intvec* target_weight)
     
    36203620      tim = clock();
    36213621      /*
    3622         Print("\n// **** Gröbnerwalk took %d steps and ", nwalk);
     3622        Print("\n// **** Grï¿œbnerwalk took %d steps and ", nwalk);
    36233623        PrintS("\n// **** call the rec. Pert. Walk to compute a red GB of:");
    36243624        idElements(Gomega, "G_omega");
     
    51305130
    51315131
    5132 /* compute the reduced Gröbner basis of an ideal <Go> w.r.t. lp */
     5132/* compute the reduced Grï¿œbner basis of an ideal <Go> w.r.t. lp */
    51335133static ideal Mpwalk_MAltwalk1(ideal Go, intvec* curr_weight, int tp_deg)
    51345134{
  • Tst/New/print_minpoly.res.gz.uu

    rec2602 rf831299  
    1 begin 640 print_minpoly.res.gz
    2 M'XL("+!JE$X``W!R:6YT7VUI;G!O;'DN<F5S`.U9;6_;-A#^[E]Q]0947A1'
    3 ME*PWNS&*;MA08!NZM-B7HBX86TZ$ZL60Y+Q@V'_?49+)T\+.BM,M6S!]D,CC
    4 M\7AW/-USE-Z^^^[USP#`YO#CZU<PK,IJG,3GPQE@ZV.<Q94QF@W$$^9SV!1Q
    5 M5GU,XVR3)[?C++H>EQ6O!F];(?8<9-L9(W>^A'=169W%V<4;,16?QBI:0V%"
    6 M62'A`K*1G#$9PV^RXX[Q)EA+?A7!*9SS,A(39I+#%QRR%XI>&35""\G%&.5B
    7 MCN@-?R77^Z$)F0G##Y0X5//=SOQZS6$!IZ>PW!:%L`N,ZC*"=9XD^;7H5K>;
    8 M"'BV:GP%Y66^359P&T=X%YPE3R/(M]5F6ST;38$L59LP%/,%F1AAUT8,:X&&
    9 M,+">!VU_-%,*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'P-%[PH!5]#KZ_3)%]^$FD-Z7FQJE,'K#:$0UU3
     15MR-""4C2O-")L*N+'02=$GZJ1#]WTCQX#X_'XVZI_;B,[>?0>J82.V^4VUU)Y
     16MSL7<NLX+(\:4:,T@?H%())X'!Q+\79N`O]N`072U01`P(3;%G2]V?;Y0Z=:M
     17MLW']!BR07.BP]DEHO*79E&:W1(<2G98X(<3#G4B7<KHMT:-$KR7ZE.BWQ$"C
     18M9:C1DEDZ-1G3Z<ELG:+,T6G*)CI5F:O3E7DZE_HZ;0.MMJ%.6]OJ:KM;2H]$
     19M#`)[#=(G:J4)<+JA*G,\B[09:=ND3<HB#\M,!="6`&BH$5KNSF,TX(#)B3U7
     20M3>QY^R+V'^_YAZ,70O!\#]0FH_\OY%Z>\X(O*\P-914O,5&TN8G!!E^D$;YI
     21M,@R'6Y*;(?0=?6UI^TG8]:CX_'"/?(7H_"26^9Z`W,D2.E#V?)+*@CM!V0L)
     22M*/M6;U#V[?Z@;/"1!I8EAE$(,PXE[T0CU=5*]712?;W4NZ!92666%G"97FX'
     23MGK7H3"1K:XX./%/)=P(TD1QH)8=ZR79WX78KZZ@`\B<W,-HG4.E["G-]G[0#
     24MT@XI%F-\;Y+HRG0H*.]8`U)/!FSO<_-O;Z"=IMW3)5S&U;E*"E-XSI_O<Z[N
     25M)_G+H;?T[]2Q$`S.XJK$!5ZM\*B29VB*I(YN2Y2WYLG%%T^4O0#@27O@,U<$
     26M3]IWWZ+GOB?_OLE.5X0$Y"]!X-Q9A`3TMT#@]BY"`O]A7P:T)<@A[UF`\+[E
     27MAY2XUW<!?>DA9=Y=>/#^98>2NM]7`7W)(:7J"XZ`G/H#<NH/K1O%1\@4:T@.
     28:_R'&F/B7)?Y4;4N#C6;?#_X!IPT9[_8:````
    2929`
    3030end
  • Tst/New/print_minpoly.stat

    rec2602 rf831299  
    1 1 >> tst_memory_0 :: 1318349487:3133- exportiert :3-1-3:ix86-Linux:mamawutz:172540
    2 1 >> tst_memory_1 :: 1318349487:3133- exportiert :3-1-3:ix86-Linux:mamawutz:666332
    3 1 >> tst_memory_2 :: 1318349487:3133- exportiert :3-1-3:ix86-Linux:mamawutz:699116
    4 1 >> tst_timer_1 :: 1318349487:3133- exportiert :3-1-3:ix86-Linux:mamawutz:8
     11 >> tst_memory_0 :: 1322057684:0- 0815 :spielwiese:version:aermel.mathematik.uni-kl.de:126640
     21 >> tst_memory_1 :: 1322057684:0- 0815 :spielwiese:version:aermel.mathematik.uni-kl.de:671744
     31 >> tst_memory_2 :: 1322057684:0- 0815 :spielwiese:version:aermel.mathematik.uni-kl.de:671744
     41 >> tst_timer_1 :: 1322057684:0- 0815 :spielwiese:version:aermel.mathematik.uni-kl.de:2
  • factory/cf_factor.cc

    raf117a rf831299  
    3131#include "facFactorize.h"
    3232#include "singext.h"
     33#include "cf_util.h"
    3334
    3435#include "int_int.h"
     
    563564      #else
    564565      ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
     566      factoryError ("multivariate factorization not implemented");
     567      return CFFList (CFFactor (f, 1));
    565568      #endif
    566569    }
     
    615618        //printf("fac.:\n");out_cff(F);
    616619      }
    617       else
     620      #else
     621      {
     622        //Use Factory without NTL
     623        //F = ZFactorizeUnivariate( fz, issqrfree );
     624        factoryError ("univariate factorization over Z not implemented");
     625        return CFFList (CFFactor (f, 1));
     626      }
    618627      #endif
    619       {
    620         //Use Factory without NTL
    621         F = ZFactorizeUnivariate( fz, issqrfree );
    622       }
    623     }
    624     else
    625     {
     628    }
     629    else
     630    {
     631      #ifdef HAVE_NTL
    626632      F = ZFactorizeMultivariate( fz, issqrfree );
     633      #else
     634      factoryError ("multivariate factorization not implemented");
     635      return CFFList (CFFactor (f, 1));
     636      #endif
    627637    }
    628638
     
    796806    #else
    797807    ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
     808    factoryError ("multivariate factorization not implemented");
     809    return CFFList (CFFactor (f, 1));
    798810    #endif
    799811
     
    809821#else
    810822    ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
     823    factoryError ("multivariate factorization not implemented");
     824    return CFFList (CFFactor (f, 1));
    811825#endif
    812826  }
  • kernel/fegetopt.h

    raf117a rf831299  
    8888  int val;
    8989  /* Stuff added for Singular  */
    90   const char*   arg_name;// name of argument, for display in help
    91   const char*   help;    // (short) help string
    92   feOptType     type;    // type of argument, if has_arg > 0
    93   void*         value;   // (default) value of option
    94   int           set;     // only relevant for strings: 0 if not set, 1 if set
     90  const char*   arg_name;/* name of argument, for display in help */
     91  const char*   help;    /* (short) help string */
     92  feOptType     type;    /* type of argument, if has_arg > 0 */
     93  void*         value;   /* (default) value of option */
     94  int           set;     /* only relevant for strings: 0 if not set, 1 if set */
    9595};
    9696
  • libpolys/polys/ext_fields/algext.cc

    raf117a rf831299  
    113113  if (a == NULL) return TRUE;
    114114  p_Test((poly)a, naRing);
    115   assume(p_Totaldegree((poly)a, naRing) <= p_Totaldegree(naMinpoly, naRing));
     115  if(p_Totaldegree((poly)a, naRing) >= p_Totaldegree(naMinpoly, naRing))
     116  {
     117    Print("deg >= deg(minpoly) in %s:%d\n",f,l);
     118    return FALSE;
     119  }
    116120  return TRUE;
    117121}
     
    486490  poly aAsPoly;
    487491  const char * result = p_Read(s, aAsPoly, naRing);
     492  definiteReduce(aAsPoly, naMinpoly, cf);
    488493  *a = (number)aAsPoly;
    489494  return result;
  • libpolys/polys/ext_fields/transext.cc

    raf117a rf831299  
    138138  assume(NUM(t) != NULL);   /**< t != 0 ==> numerator(t) != 0 */
    139139  p_Test(NUM(t), ntRing);
    140   if (!DENIS1(t)) p_Test(DEN(t), ntRing);
     140  if (!DENIS1(t))
     141  {
     142    p_Test(DEN(t), ntRing);
     143    if(p_IsConstant(DEN(t),ntRing) && (n_IsOne(pGetCoeff(DEN(t)),ntRing->cf)))
     144    {
     145      Print("?/1 in %s:%d\n",f,l);
     146       return FALSE;
     147    }
     148  }
    141149  return TRUE;
    142150}
     
    561569  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    562570  NUM(result) = g;
    563   DEN(result) = f;
     571  if (!p_IsConstant(f,ntRing) || !n_IsOne(pGetCoeff(f),ntRing->cf))
     572    DEN(result) = f;
    564573  COM(result) = COM(fa) + COM(fb) + MULT_COMPLEXITY;
    565574  heuristicGcdCancellation((number)result, cf);
Note: See TracChangeset for help on using the changeset viewer.