Changeset dad9fb in git


Ignore:
Timestamp:
Mar 15, 2012, 5:26:46 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
8066cd9340c30bf555310cdb3ca4a9c82b4f3e92a82c308b8fbf35f5d32c156ead224188e2610f7e
Parents:
788fdfc919bcf38d8b469a0f59374abf9046985dd841a16156c2e0b2a5e731384a7a5e454dffe2d8
Message:
Merge pull request #82 from mmklee/bug_fixes_sw

Bug fixes sw
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/resbinomial.lib

    r788fdf rdad9fb  
    109109
    110110if (cont!=n or n<=2){
    111 
    112              // defining the new variables in Lring2[2]
    113 
    114               list Lring,Lring2;
    115               Lring=ringlist(basering);
    116 
    117               ring raux=0,(x(1..n)),dp;
    118               setring r;
    119               Lring2=ringlist(raux);
    120 
    121111             // making the change
    122 
    123               for (i=1;i<=n; i++){ Lring[2][i]=Lring2[2][i];}
    124 
    125               def Rnew=ring(Lring);
     112              def Rnew=changevar ("x()");
    126113              setring Rnew;
    127114                // print("INVERTIBLE VARIABLES NOT CONSIDERED AT THE BEGINNING");
  • Singular/LIB/sagbi.lib

    r788fdf rdad9fb  
    7070  //-------- extend current baserring r with new variables @y,
    7171  // one for each new element in ideal algebra  -------------
     72  setring r;
    7273  list l = ringlist(r);
    7374  for (i=nvars(r)-nvars(br)+1; i<=numTotalAdditionalVars;i++)
  • Singular/cntrlc.cc

    rd841a1 rdad9fb  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id$ */
    54/*
    65* ABSTRACT - interupt handling
     
    223222#endif /* __OPTIMIZE__ */
    224223#ifdef CALL_GDB
    225   if (sig!=SIGINT) 
     224  if (sig!=SIGINT)
    226225  {
    227226    if (singular_in_batchmode) debug(STACK_TRACE);
     
    248247void sig_chld_hdl(int sig)
    249248{
    250  waitpid(-1,NULL,WNOHANG); 
     249  waitpid(-1,NULL,WNOHANG);
    251250}
    252251
  • Singular/iparith.cc

    rd841a1 rdad9fb  
    60136013  }
    60146014#endif
    6015   if (!(ringvar=pVar(p)))
     6015  if ((ringvar=pVar(p))==0)
    60166016  {
    60176017    if (rField_is_Extension(currRing))
     
    60196019      assume(currRing->cf->extRing!=NULL);
    60206020      number n = pGetCoeff(p);
    6021       ringvar=- n_IsParam(n, currRing);
     6021      ringvar= -n_IsParam(n, currRing);
    60226022    }
    60236023    if(ringvar==0)
  • Singular/ipshell.cc

    r788fdf rdad9fb  
    50915091       LongComplexInfo param;
    50925092
    5093        param.float_len = float_len;
    5094        param.float_len2 = float_len2;
     5093       param.float_len = si_min (float_len, 32767);
     5094       param.float_len2 = si_min (float_len2, 32767);
    50955095
    50965096       // set the parameter name
    50975097       if (complex_flag)
    50985098       {
     5099         if (param.float_len < SHORT_REAL_LENGTH)
     5100         {
     5101           param.float_len= SHORT_REAL_LENGTH;
     5102           param.float_len2= SHORT_REAL_LENGTH;
     5103         }
    50995104         if (pn->next == NULL)
    51005105           param.par_name=(const char*)"i"; //default to i
  • libpolys/coeffs/gnumpc.cc

    r788fdf rdad9fb  
    432432  n->cfSetChar=ngcSetChar;
    433433
    434 //  r->cfInit_bigint=ngcInit_bigint;
     434  n->cfInit_bigint=ngcMapQ;
    435435
    436436/*
  • libpolys/coeffs/gnumpc.h

    r788fdf rdad9fb  
    5252
    5353
    54 // Why is this here? who needs it?
    55 // number ngcMapQ(number from, const coeffs r, const coeffs aRing);
     54number ngcMapQ(number from, const coeffs r, const coeffs aRing);
    5655#endif
    5756/* GMPCOMPLEX_H */
  • libpolys/coeffs/gnumpfl.cc

    r788fdf rdad9fb  
    433433  n->cfSetMap = ngfSetMap;
    434434  n->cfCoeffWrite = ngfCoeffWrite;
     435  n->cfInit_bigint = ngfMapQ;
    435436#ifdef LDEBUG
    436437  n->cfDBTest  = ndDBTest; // not yet implemented: ngfDBTest
  • libpolys/coeffs/gnumpfl.h

    r788fdf rdad9fb  
    4242void     ngfDelete(number *a, const coeffs r);
    4343
    44 number ngfMapQ(number from, const coeffs r);
     44number ngfMapQ(number from, const coeffs src, const coeffs r);
    4545
    4646#endif
  • libpolys/coeffs/shortfl.cc

    r788fdf rdad9fb  
    572572  n->cfSetMap = nrSetMap;
    573573  n->cfCoeffWrite  = nrCoeffWrite;
     574  n->cfInit_bigint = nrMapQ;
    574575
    575576    /* nName= ndName; */
  • libpolys/coeffs/shortfl.h

    r788fdf rdad9fb  
    4444// Where are the following used?
    4545// int     nrGetChar();
    46 // number nrMapQ(number from, const coeffs r, const coeffs aRing);
     46number nrMapQ(number from, const coeffs r, const coeffs aRing);
    4747
    4848
  • libpolys/polys/ext_fields/transext.cc

    r788fdf rdad9fb  
    247247  if (IS0(a)) return NULL;
    248248  fraction f = (fraction)a;
    249   poly g = p_Copy(NUM(f), ntRing);
    250249  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    251   NUM(result) = g;
    252   DEN(result) = NULL;
    253   COM(result) = 0;
     250  BOOLEAN denis1= DENIS1 (f);
     251  if (getCoeffType (ntCoeffs) == n_Q && !denis1)
     252    handleNestedFractionsOverQ (f, cf);
     253  NUM (result)= p_Copy (NUM (f), ntRing);
     254  DEN (result) = NULL;
     255  COM (result) = 0;
     256  if (getCoeffType (ntCoeffs) == n_Q && denis1)
     257  {
     258    if (!p_IsConstant (NUM (result), ntRing) && pNext (NUM(result)) != NULL)
     259      p_Cleardenom (NUM(result), ntRing);
     260    else
     261    {
     262      number g= p_GetAllDenom (NUM (result), ntRing);
     263      NUM (result)= p_Mult_nn (NUM (result), g, ntRing);
     264    }
     265  }
    254266  return (number)result;
    255267}
     
    260272  definiteGcdCancellation(a, cf, FALSE);
    261273  fraction f = (fraction)a;
    262   poly g;
    263   if (IS0(f) || DENIS1(f)) g = p_One(ntRing);
    264   else g = p_Copy(DEN(f), ntRing);
    265274  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    266   NUM(result) = g;
    267   DEN(result) = NULL;
    268   COM(result) = 0;
     275  number g;
     276  if (IS0(f) || (DENIS1 (f) && getCoeffType (ntCoeffs) != n_Q))
     277  {
     278    NUM (result)= p_One(ntRing);
     279    DEN (result)= NULL;
     280    COM (result)= 0;
     281  }
     282  else if (DENIS1 (f))
     283  {
     284    poly num= p_Copy (NUM (f), ntRing);
     285    if (!p_IsConstant (num, ntRing) && pNext(num) != NULL)
     286      p_Cleardenom_n (num, ntRing, g);
     287    else
     288      g= p_GetAllDenom (num, ntRing);
     289    result= (fraction) ntSetMap (ntRing->cf, cf) (g, ntRing->cf, cf);
     290  }
     291  else
     292  {
     293    if (getCoeffType (ntCoeffs) == n_Q)
     294      handleNestedFractionsOverQ (f, cf);
     295    NUM (result)= p_Copy (DEN (f), ntRing);
     296    DEN (result) = NULL;
     297    COM (result) = 0;
     298  }
    269299  return (number)result;
    270300}
     
    10491079  if (n_IsZero(a, src)) return NULL;
    10501080  assume(src == dst->extRing->cf);
    1051   poly p = p_One(dst->extRing);
     1081  poly p = p_Init(dst->extRing);
    10521082  number na=n_Copy(a, src);
    10531083  n_Normalize(na, src);
    1054   p_SetCoeff(p, na, dst->extRing);
     1084  p_SetCoeff0(p, na, dst->extRing);
    10551085  fraction f = (fraction)omAlloc0Bin(fractionObjectBin);
    10561086  NUM(f) = p; DEN(f) = NULL; COM(f) = 0;
  • libpolys/polys/monomials/p_polys.cc

    r788fdf rdad9fb  
    34143414       return NULL;
    34153415
    3416     if( !DENIS1(z) )
    3417       WarnS("Not implemented yet: Cannot permute a rational fraction and make a polynomial out of it! Ignorring the denumerator.");
     3416    //if( !DENIS1(z) )
     3417      //WarnS("Not implemented yet: Cannot permute a rational fraction and make a polynomial out of it! Ignorring the denumerator.");
    34183418  } else
    34193419     {
  • libpolys/polys/monomials/p_polys.h

    rd841a1 rdad9fb  
    437437    switch(r->typ[i].ord_typ)
    438438    {
     439      case ro_am:
    439440      case ro_wp_neg:
    440441        return (((long)((p)->exp[r->pOrdIndex]))-POLY_NEGWEIGHT_OFFSET);
  • libpolys/polys/monomials/ring.cc

    r788fdf rdad9fb  
    795795        r1->cf->ref++;
    796796      }
     797      else if ((getCoeffType (r2->cf)==n_algExt || getCoeffType (r2->cf)==n_transExt) && rChar(r2) == rChar(r1))
     798      {
     799        /*AlgExtInfo extParam;
     800        extParam.r = r2->cf->extRing;
     801        extParam.i = r2->cf->extRing->minideal;*/
     802        tmpR.cf=r2->cf;
     803        r2->cf->ref++;
     804      }
    797805      else
    798806      {
     
    809817    {
    810818      if (getCoeffType(r2->cf)==n_Zp)
     819      {
     820        tmpR.cf=r2->cf;
     821        r2->cf->ref++;
     822      }
     823      else if (getCoeffType(r2->cf)==n_algExt || getCoeffType(r2->cf)==n_transExt)
    811824      {
    812825        tmpR.cf=r2->cf;
  • m4/options.m4

    r788fdf rdad9fb  
    6161if test x$ENABLE_PLURAL = xyes; then
    6262  AC_DEFINE(HAVE_PLURAL,1,Enable non-commutative subsystem)
     63  #TODO make a seperate switch
     64  AC_DEFINE(HAVE_SHIFTBBA,1,Enable letterplace)
    6365fi
    6466
Note: See TracChangeset for help on using the changeset viewer.