Changeset b8f562 in git


Ignore:
Timestamp:
Mar 13, 2014, 1:32:13 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
b9cb8c8a040ef87acfc952d2d3984a3574c8d888
Parents:
4e56502b6def8f585d698b2aeb301eaf4058b84f12f99241d3dee1439cdbdb7ec86a393c468c17fe
Message:
Merge pull request #537 from mmklee/factory_emsg

Factory emsg
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/grobcov.lib

    r12f992 rb8f562  
    196196  def RR=basering;
    197197  def @R=basering;  // must be of the form K[a][x], a=parameters, x=variables
    198   def Rx=ringlist(RR);
     198  list Rx=ringlist(RR);
    199199  def @P=ring(Rx[1]);
    200200  list Lx;
     
    210210  exportto(Top,@RP);     // global ring K[x,a] with product order
    211211  setring(RR);
    212 };
     212}
    213213example
    214214{ "EXAMPLE:"; echo = 2;
     
    253253  if(te){kill @R; kill @RP; kill @P;}
    254254  return(Jc);
    255 };
     255}
    256256
    257257proc memberpos(f,J)
     
    705705    if(te==0){kill @R; kill @RP; kill @P;}
    706706    return(f2)
    707 };
     707}
    708708example
    709709{ "EXAMPLE:"; echo = 2;
     
    752752    }
    753753  }
    754 };
     754}
    755755
    756756// delfromideal: deletes the i-th polynomial from the ideal F
     
    857857  if(te==1){setglobalrings();}
    858858  return(G);
    859 };
     859}
    860860
    861861// eliminates repeated elements form an ideal or matrix or module or intmat or bigintmat
     
    24992499  def LP=imap(RR,LPr);
    25002500  int j; poly p;
    2501   def F=ideal(1);
     2501  ideal F=ideal(1);
    25022502  poly f;
    25032503  poly fn;
     
    25652565  setring(@R);
    25662566  def ff=imap(RR,f);
    2567   def l=factorize(ff,0);
     2567  list l=factorize(ff,0);
    25682568  poly f1=1;
    25692569  for(i=2;i<=size(l[1]);i++)
     
    25742574  def f2=imap(@R,f1);
    25752575  return(f2);
    2576 };
     2576}
    25772577
    25782578//Auxiliary routine
  • Singular/cntrlc.cc

    r12f992 rb8f562  
    148148#else
    149149  struct sigaction new_action,old_action;
     150  memset(&new_action, 0, sizeof(struct sigaction));
    150151
    151152  /* Set up the structure to specify the new action. */
  • Singular/extra.cc

    r4e5650 rb8f562  
    35883588        {
    35893589#ifdef HAVE_PLURAL
    3590           Print("NTL_0:%d (use NTL for gcd of polynomials in char 0)\n",isOn(SW_USE_NTL_GCD_0));
    3591           Print("NTL_p:%d (use NTL for gcd of polynomials in char p)\n",isOn(SW_USE_NTL_GCD_P));
    35923590          Print("EZGCD:%d (use EZGCD for gcd of polynomials in char 0)\n",isOn(SW_USE_EZGCD));
    35933591          Print("EZGCD_P:%d (use EZGCD_P for gcd of polynomials in char p)\n",isOn(SW_USE_EZGCD_P));
     
    36053603          char *s=(char *)h->Data();
    36063604#ifdef HAVE_PLURAL
    3607           if (strcmp(s,"NTL_0")==0) { if (d) On(SW_USE_NTL_GCD_0); else Off(SW_USE_NTL_GCD_0); } else
    3608           if (strcmp(s,"NTL_p")==0) { if (d) On(SW_USE_NTL_GCD_P); else Off(SW_USE_NTL_GCD_P); } else
    36093605          if (strcmp(s,"EZGCD")==0) { if (d) On(SW_USE_EZGCD); else Off(SW_USE_EZGCD); } else
    36103606          if (strcmp(s,"EZGCD_P")==0) { if (d) On(SW_USE_EZGCD_P); else Off(SW_USE_EZGCD_P); } else
  • Singular/misc_ip.cc

    r4e5650 rb8f562  
    11681168{
    11691169// factory default settings: -----------------------------------------------
    1170   On(SW_USE_NTL);
    1171   On(SW_USE_NTL_GCD_0); // On -> seg11 in Old/algnorm, Old/factor...
    1172   On(SW_USE_NTL_GCD_P); // On -> cyle in Short/brnoeth_s: fixed
    11731170  On(SW_USE_EZGCD);
    11741171  On(SW_USE_CHINREM_GCD);
  • Singular/table.h

    r12f992 rb8f562  
    160160,{D(jjidMaxIdeal), MAXID_CMD,       IDEAL_CMD,      INT_CMD       , ALLOW_PLURAL |ALLOW_RING}
    161161,{D(jjMEMORY),     MEMORY_CMD,      BIGINT_CMD,     INT_CMD       , ALLOW_PLURAL |ALLOW_RING}
    162 ,{D(jjidMinBase),  MINBASE_CMD,     XS(IDEAL_CMD),  IDEAL_CMD     , NO_PLURAL |ALLOW_RING}
    163 ,{D(jjidMinBase),  MINBASE_CMD,     XS(MODUL_CMD),  MODUL_CMD     , NO_PLURAL |ALLOW_RING}
     162,{D(jjidMinBase),  MINBASE_CMD,     XS(IDEAL_CMD),  IDEAL_CMD     , NO_PLURAL |NO_RING}
     163,{D(jjidMinBase),  MINBASE_CMD,     XS(MODUL_CMD),  MODUL_CMD     , NO_PLURAL |NO_RING}
    164164,{D(jjMINRES),     MINRES_CMD,      LIST_CMD,       LIST_CMD      , ALLOW_PLURAL |ALLOW_RING}
    165165,{D(jjMINRES_R),   MINRES_CMD,      RESOLUTION_CMD, RESOLUTION_CMD, ALLOW_PLURAL |ALLOW_RING}
  • factory/cf_chinese.cc

    r4e5650 rb8f562  
    212212        {
    213213#ifdef HAVE_NTL
    214           if (c.inZ() && isOn (SW_USE_NTL))
     214          if (c.inZ())
    215215          {
    216216            ZZ NTLc= convertFacCF2NTLZZ (c);
  • factory/cf_defs.h

    r4e5650 rb8f562  
    2727const int SW_RATIONAL = 0;
    2828const int SW_SYMMETRIC_FF = 1;
    29 const int SW_BERLEKAMP = 2;
    30 const int SW_FAC_QUADRATICLIFT = 3;
    31 const int SW_USE_EZGCD = 4;
    32 const int SW_USE_EZGCD_P = 5;
    33 const int SW_USE_NTL=6;
    34 const int SW_USE_NTL_GCD_0=7;
    35 const int SW_USE_NTL_GCD_P=8;
    36 const int SW_USE_NTL_SORT=9;
    37 const int SW_USE_CHINREM_GCD=10;
    38 const int SW_USE_QGCD=11;
    39 const int SW_USE_FF_MOD_GCD=12;
     29const int SW_USE_EZGCD = 2;
     30const int SW_USE_EZGCD_P = 3;
     31const int SW_USE_NTL_SORT=4;
     32const int SW_USE_CHINREM_GCD=5;
     33const int SW_USE_QGCD=6;
     34const int SW_USE_FF_MOD_GCD=7;
    4035//}}}
    4136
  • factory/cf_factor.cc

    r4e5650 rb8f562  
    389389  if ( f.inCoeffDomain() )
    390390        return CFFList( f );
     391#ifndef NOASSERT
     392  Variable a;
     393  ASSERT (!hasFirstAlgVar (f, a), "f has an algebraic variable use factorize \
     394          ( const CanonicalForm & f, const Variable & alpha ) instead");
     395#endif
    391396  //out_cf("factorize:",f,"==================================\n");
    392397  if (! f.isUnivariate() )
     
    441446      else
    442447#endif
    443       if (isOn(SW_USE_NTL) && (isPurePoly(f)))
    444448      {
    445449        // USE NTL
     
    484488        }
    485489      }
    486       else
     490#else
     491      // Use Factory without NTL
     492      factoryError ("univariate factorization depends on NTL(missing)");
     493      return CFFList (CFFactor (f, 1));
    487494#endif //HAVE_NTL
    488       {  // Use Factory without NTL
    489         factoryError ("uniivariate factorization not implemented");
    490         return CFFList (CFFactor (f, 1));
    491       }
    492495    }
    493496    else
     
    518521      }
    519522      #else
    520       ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
    521       factoryError ("multivariate factorization not implemented");
     523      ASSERT( f.isUnivariate(), "multivariate factorization depends on NTL(missing)" );
     524      factoryError ("multivariate factorization depends on NTL(missing)");
    522525      return CFFList (CFFactor (f, 1));
    523526      #endif
     
    534537    {
    535538      #ifdef HAVE_NTL
    536       if ((isOn(SW_USE_NTL)) && (isPurePoly(f)))
    537       {
    538         //USE NTL
    539         CanonicalForm ic=icontent(fz);
    540         fz/=ic;
    541         ZZ c;
    542         vec_pair_ZZX_long factors;
    543         //factorize the converted polynomial
    544         factor(c,factors,convertFacCF2NTLZZX(fz));
    545 
    546         //convert the result back to Factory
    547         F=convertNTLvec_pair_ZZX_long2FacCFFList(factors,c,fz.mvar());
    548         if ( ! ic.isOne() )
     539      //USE NTL
     540      CanonicalForm ic=icontent(fz);
     541      fz/=ic;
     542      ZZ c;
     543      vec_pair_ZZX_long factors;
     544      //factorize the converted polynomial
     545      factor(c,factors,convertFacCF2NTLZZX(fz));
     546
     547      //convert the result back to Factory
     548      F=convertNTLvec_pair_ZZX_long2FacCFFList(factors,c,fz.mvar());
     549      if ( ! ic.isOne() )
     550      {
     551        if ( F.getFirst().factor().inCoeffDomain() )
    549552        {
    550           if ( F.getFirst().factor().inCoeffDomain() )
    551           {
    552             CFFactor new_first( F.getFirst().factor() * ic );
    553             F.removeFirst();
    554             F.insert( new_first );
    555           }
    556           else
    557             F.insert( CFFactor( ic ) );
     553          CFFactor new_first( F.getFirst().factor() * ic );
     554          F.removeFirst();
     555          F.insert( new_first );
    558556        }
    559557        else
     558          F.insert( CFFactor( ic ) );
     559      }
     560      else
     561      {
     562        if ( !F.getFirst().factor().inCoeffDomain() )
    560563        {
    561           if ( !F.getFirst().factor().inCoeffDomain() )
    562           {
    563             CFFactor new_first( 1 );
    564             F.insert( new_first );
    565           }
     564          CFFactor new_first( 1 );
     565          F.insert( new_first );
    566566        }
    567567      }
    568568      #else
    569       {
    570         factoryError ("univariate factorization over Z not implemented");
    571         return CFFList (CFFactor (f, 1));
    572       }
     569      factoryError ("univariate factorization over Z depends on NTL(missing)");
     570      return CFFList (CFFactor (f, 1));
    573571      #endif
    574572    }
     
    588586      Off (SW_RATIONAL);
    589587      #else
    590       factoryError ("multivariate factorization not implemented");
     588      factoryError ("multivariate factorization  depends on NTL(missing)");
    591589      return CFFList (CFFactor (f, 1));
    592590      #endif
     
    621619  //out_cf("factorize:",f,"==================================\n");
    622620  //out_cf("mipo:",getMipo(alpha),"\n");
     621
    623622  CFFList F;
    624   ASSERT( alpha.level() < 0, "not an algebraic extension" );
     623  ASSERT( alpha.level() < 0 && getReduce (alpha), "not an algebraic extension" );
     624#ifndef NOASSERT
     625  Variable beta;
     626  if (hasFirstAlgVar(f, beta))
     627    ASSERT (!hasFirstAlgVar (f, beta == alpha), "f has an algebraic variable that \
     628    does not coincide with alpha");
     629#endif
    625630  int ch=getCharacteristic();
    626631  if (f.isUnivariate()&& (ch>0))
    627632  {
    628     #ifdef HAVE_NTL
    629     if  (isOn(SW_USE_NTL))
    630     {
    631       //USE NTL
    632       if (ch>2)
    633       {
     633#ifdef HAVE_NTL
     634    //USE NTL
     635    if (ch>2)
     636    {
    634637#if (HAVE_FLINT && __FLINT_VERSION_MINOR >= 4)
    635         nmod_poly_t FLINTmipo, leadingCoeff;
    636         fq_nmod_ctx_t fq_con;
    637 
    638         nmod_poly_init (FLINTmipo, getCharacteristic());
    639         nmod_poly_init (leadingCoeff, getCharacteristic());
    640         convertFacCF2nmod_poly_t (FLINTmipo, getMipo (alpha));
    641 
    642         fq_nmod_ctx_init_modulus (fq_con, FLINTmipo, "Z");
    643         fq_nmod_poly_t FLINTF;
    644         convertFacCF2Fq_nmod_poly_t (FLINTF, f, fq_con);
    645         fq_nmod_poly_factor_t res;
    646         fq_nmod_poly_factor_init (res, fq_con);
    647         fq_nmod_poly_factor (res, leadingCoeff, FLINTF, fq_con);
    648         F= convertFLINTFq_nmod_poly_factor2FacCFFList (res, f.mvar(), alpha, fq_con);
    649         F.insert (CFFactor (Lc (f), 1));
    650 
    651         fq_nmod_poly_factor_clear (res, fq_con);
    652         fq_nmod_poly_clear (FLINTF, fq_con);
    653         nmod_poly_clear (FLINTmipo);
    654         nmod_poly_clear (leadingCoeff);
    655         fq_nmod_ctx_clear (fq_con);
     638      nmod_poly_t FLINTmipo, leadingCoeff;
     639      fq_nmod_ctx_t fq_con;
     640
     641      nmod_poly_init (FLINTmipo, getCharacteristic());
     642      nmod_poly_init (leadingCoeff, getCharacteristic());
     643      convertFacCF2nmod_poly_t (FLINTmipo, getMipo (alpha));
     644
     645      fq_nmod_ctx_init_modulus (fq_con, FLINTmipo, "Z");
     646      fq_nmod_poly_t FLINTF;
     647      convertFacCF2Fq_nmod_poly_t (FLINTF, f, fq_con);
     648      fq_nmod_poly_factor_t res;
     649      fq_nmod_poly_factor_init (res, fq_con);
     650      fq_nmod_poly_factor (res, leadingCoeff, FLINTF, fq_con);
     651      F= convertFLINTFq_nmod_poly_factor2FacCFFList (res, f.mvar(), alpha, fq_con);
     652      F.insert (CFFactor (Lc (f), 1));
     653
     654      fq_nmod_poly_factor_clear (res, fq_con);
     655      fq_nmod_poly_clear (FLINTF, fq_con);
     656      nmod_poly_clear (FLINTmipo);
     657      nmod_poly_clear (leadingCoeff);
     658      fq_nmod_ctx_clear (fq_con);
    656659#else
    657         // First all cases with characteristic !=2
    658         // set remainder
    659         if (fac_NTL_char != getCharacteristic())
    660         {
    661           fac_NTL_char = getCharacteristic();
    662           zz_p::init(getCharacteristic());
    663         }
    664 
    665         // set minimal polynomial in NTL
    666         zz_pX minPo=convertFacCF2NTLzzpX(getMipo(alpha));
    667         zz_pE::init (minPo);
    668 
    669         // convert to NTL
    670         zz_pEX f1=convertFacCF2NTLzz_pEX(f,minPo);
    671         zz_pE leadcoeff= LeadCoeff(f1);
    672 
    673         //make monic
    674         f1=f1 / leadcoeff;
    675 
    676         // factorize using NTL
    677         vec_pair_zz_pEX_long factors;
    678         CanZass(factors,f1);
    679 
    680         // return converted result
    681         F=convertNTLvec_pair_zzpEX_long2FacCFFList(factors,leadcoeff,f.mvar(),alpha);
    682 #endif
    683       }
    684       else if (/*getCharacteristic()*/ch==2)
    685       {
    686         // special case : GF2
    687 
    688         // remainder is two ==> nothing to do
    689 
    690         // set minimal polynomial in NTL using the optimized conversion routines for characteristic 2
    691         GF2X minPo=convertFacCF2NTLGF2X(getMipo(alpha,f.mvar()));
    692         GF2E::init (minPo);
    693 
    694         // convert to NTL again using the faster conversion routines
    695         GF2EX f1;
    696         if (isPurePoly(f))
    697         {
    698           GF2X f_tmp=convertFacCF2NTLGF2X(f);
    699           f1=to_GF2EX(f_tmp);
    700         }
    701         else
    702         {
    703           f1=convertFacCF2NTLGF2EX(f,minPo);
    704         }
    705 
    706         // make monic (in Z/2(a))
    707         GF2E f1_coef=LeadCoeff(f1);
    708         MakeMonic(f1);
    709 
    710         // factorize using NTL
    711         vec_pair_GF2EX_long factors;
    712         CanZass(factors,f1);
    713 
    714         // return converted result
    715         F=convertNTLvec_pair_GF2EX_long2FacCFFList(factors,f1_coef,f.mvar(),alpha);
     660      // First all cases with characteristic !=2
     661      // set remainder
     662      if (fac_NTL_char != getCharacteristic())
     663      {
     664        fac_NTL_char = getCharacteristic();
     665        zz_p::init(getCharacteristic());
     666      }
     667
     668      // set minimal polynomial in NTL
     669      zz_pX minPo=convertFacCF2NTLzzpX(getMipo(alpha));
     670      zz_pE::init (minPo);
     671
     672      // convert to NTL
     673      zz_pEX f1=convertFacCF2NTLzz_pEX(f,minPo);
     674      zz_pE leadcoeff= LeadCoeff(f1);
     675
     676      //make monic
     677      f1=f1 / leadcoeff;
     678
     679      // factorize using NTL
     680      vec_pair_zz_pEX_long factors;
     681      CanZass(factors,f1);
     682
     683      // return converted result
     684      F=convertNTLvec_pair_zzpEX_long2FacCFFList(factors,leadcoeff,f.mvar(),alpha);
     685#endif
     686    }
     687    else if (/*getCharacteristic()*/ch==2)
     688    {
     689      // special case : GF2
     690
     691      // remainder is two ==> nothing to do
     692
     693      // set minimal polynomial in NTL using the optimized conversion routines for characteristic 2
     694      GF2X minPo=convertFacCF2NTLGF2X(getMipo(alpha,f.mvar()));
     695      GF2E::init (minPo);
     696
     697      // convert to NTL again using the faster conversion routines
     698      GF2EX f1;
     699      if (isPurePoly(f))
     700      {
     701        GF2X f_tmp=convertFacCF2NTLGF2X(f);
     702        f1=to_GF2EX(f_tmp);
    716703      }
    717704      else
    718       {
    719       }
    720     }
    721     else
    722     #endif
    723     {
    724       factoryError ("univariate factorization not implemented");
    725       return CFFList (CFFactor (f, 1));
    726     }
     705        f1=convertFacCF2NTLGF2EX(f,minPo);
     706
     707      // make monic (in Z/2(a))
     708      GF2E f1_coef=LeadCoeff(f1);
     709      MakeMonic(f1);
     710
     711      // factorize using NTL
     712      vec_pair_GF2EX_long factors;
     713      CanZass(factors,f1);
     714
     715      // return converted result
     716      F=convertNTLvec_pair_GF2EX_long2FacCFFList(factors,f1_coef,f.mvar(),alpha);
     717    }
     718#else
     719    factoryError ("univariate factorization  depends on NTL(missing)");
     720    return CFFList (CFFactor (f, 1));
     721#endif //HAVE_NTL
    727722  }
    728723  else if (ch>0)
     
    731726    F= FqFactorize (f, alpha);
    732727    #else
    733     ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
    734     factoryError ("multivariate factorization not implemented");
     728    ASSERT( f.isUnivariate(), "multivariate factorization depends on NTL(missing)" );
     729    factoryError ("multivariate factorization  depends on NTL(missing)");
    735730    return CFFList (CFFactor (f, 1));
    736731    #endif
     
    746741    F= ratFactorize (f, alpha);
    747742#else
    748     ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
    749     factoryError ("multivariate factorization not implemented");
     743    ASSERT( f.isUnivariate(), "multivariate factorization  depends on NTL(missing)" );
     744    factoryError ("multivariate factorization  depends on NTL(missing)");
    750745    return CFFList (CFFactor (f, 1));
    751746#endif
  • factory/cf_gcd.cc

    r4e5650 rb8f562  
    336336  }
    337337#else
    338   if (isOn(SW_USE_NTL_GCD_P) && ( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)
     338  if (( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)
    339339  &&  (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g))
    340340  {
     
    377377  }
    378378#else
    379   if (isOn(SW_USE_NTL_GCD_0) && ( getCharacteristic() ==0)
     379  if (( getCharacteristic() ==0)
    380380  && (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g))
    381381  {
     
    400400      else
    401401      {
    402         Off(SW_USE_NTL_GCD_0);
    403         r=extgcd(f,g,a,b);
    404         if (isOn(SW_RATIONAL))
    405         {
    406           a/=r.lc();
    407           b/=r.lc();
    408           r/=r.lc();
    409         }
    410         On(SW_USE_NTL_GCD_0);
     402        F1 /= R;
     403        G1 /= R;
     404        XGCD (RR, A,B,F1,G1,1);
     405        rr=convertZZ2CF(RR);
     406        a=convertNTLZZX2CF(A,f.mvar())*(fc/rr);
     407        b=convertNTLZZX2CF(B,f.mvar())*(gc/rr);
    411408      }
    412409    }
     
    422419      else
    423420      {
    424         Off(SW_USE_NTL_GCD_0);
    425         r=extgcd(f,g,a,b);
    426         if (isOn(SW_RATIONAL))
    427         {
    428           a/=r.lc();
    429           b/=r.lc();
    430           r/=r.lc();
    431         }
    432         On(SW_USE_NTL_GCD_0);
     421        F1 /= R;
     422        G1 /= R;
     423        XGCD (RR, A,B,F1,G1,1);
     424        rr=convertZZ2CF(RR);
     425        a=convertNTLZZX2CF(A,f.mvar())*(fc/rr);
     426        b=convertNTLZZX2CF(B,f.mvar())*(gc/rr);
    433427      }
    434428      return r;
     
    675669#else
    676670#ifdef HAVE_NTL
    677         if ( isOn(SW_USE_NTL_GCD_P) && bpure && (CFFactory::gettype() != GaloisFieldDomain))
     671        if (bpure && (CFFactory::gettype() != GaloisFieldDomain))
    678672            return gcd_univar_ntlp(pi, pi1 ) * C;
    679673#endif
     
    794788#else
    795789#ifdef HAVE_NTL
    796         if ( isOn(SW_USE_NTL_GCD_0) && isPurePoly(pi) && isPurePoly(pi1) )
     790        if (isPurePoly(pi) && isPurePoly(pi1) )
    797791            return gcd_univar_ntl0(pi, pi1 ) * C;
    798792#endif
  • factory/cf_switches.cc

    r4e5650 rb8f562  
    3030// and set the default (recommended) On-values:
    3131#ifdef HAVE_NTL
    32   On(SW_USE_NTL);
    3332  On(SW_USE_CHINREM_GCD);
    34   //Off(SW_USE_NTL_GCD_0);
    35   //Off(SW_USE_NTL_GCD_P);
    3633  //Off(SW_USE_NTL_SORT);
    3734#endif
  • factory/cf_switches.h

    r4e5650 rb8f562  
    1818//
    1919//}}}
    20 const int CFSwitchesMax = 13;
     20const int CFSwitchesMax = 8;
    2121//}}}
    2222
  • libpolys/coeffs/numbers.cc

    r12f992 rb8f562  
    508508    {
    509509      nInitCharTable=(cfInitCharProc*)omAlloc0(
    510                                           nLastCoeffs*sizeof(cfInitCharProc));
     510                                          ((int)nLastCoeffs+1)*sizeof(cfInitCharProc));
    511511      memcpy(nInitCharTable,nInitCharTableDefault,
    512               (nLastCoeffs-1)*sizeof(cfInitCharProc));
     512              ((int)nLastCoeffs)*sizeof(cfInitCharProc));
    513513    }
    514514    else
    515515    {
    516516      nInitCharTable=(cfInitCharProc*)omReallocSize(nInitCharTable,
    517                                           (((int)nLastCoeffs)-1)*sizeof(cfInitCharProc),
    518                                           ((int)nLastCoeffs)*sizeof(cfInitCharProc));
     517                                          ((int)nLastCoeffs)*sizeof(cfInitCharProc),
     518                                          (((int)nLastCoeffs)+1)*sizeof(cfInitCharProc));
    519519    }
    520520
  • libpolys/reporter/reporter.cc

    r12f992 rb8f562  
    135135  feBufferStart=feBuffer;
    136136  feBuffer_cnt++;
     137  assume(feBuffer_cnt<8);
    137138  int l;
    138139  long more;
     
    152153  char *r=feBuffer;
    153154  feBuffer_cnt--;
     155  assume(feBuffer_cnt >=0);
    154156  feBuffer=feBuffer_save[feBuffer_cnt];
    155157  feBufferLength=feBufferLength_save[feBuffer_cnt];
Note: See TracChangeset for help on using the changeset viewer.