Changeset 6f68e2b in git


Ignore:
Timestamp:
Sep 17, 2020, 4:45:37 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
bbbc309031ddb6d2d4aaaa85bead583fd1860c07
Parents:
f61c736770348c2dfd0c8aa73d011e971b25ed16
Message:
fix: Singular.jl/issues/270
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factor.cc

    rf61c736 r6f68e2b  
    616616    else // multivariate,  char 0
    617617    {
    618       On (SW_RATIONAL);
    619618      if (issqrfree)
    620619      {
    621620        #ifdef HAVE_NTL
     621        On (SW_RATIONAL);
    622622        CFList factors= ratSqrfFactorize (fz);
    623623        for (CFListIterator i= factors; i.hasItem(); i++)
     
    630630      {
    631631        #ifdef HAVE_NTL
     632        On (SW_RATIONAL);
    632633        F = ratFactorize (fz);
    633634        #else
     
    635636        #endif
    636637      }
    637       Off (SW_RATIONAL);
    638638    }
    639639
     
    641641    if ( on_rational )
    642642      On(SW_RATIONAL);
     643    else
     644      Off(SW_RATIONAL);
    643645    if ( ! cd.isOne() )
    644646    {
  • factory/fac_multivar.cc

    rf61c736 r6f68e2b  
    161161      {
    162162        find_good_prime(i.coeff(),start);
    163         if (0==cf_getSmallPrime(start)) return;
     163        if (start==cf_getNumSmallPrimes()) return;
    164164        if((i.exp()!=0) && ((i.exp() % cf_getSmallPrime(start))==0))
    165165        {
    166166          start++;
     167          if (start==cf_getNumSmallPrimes()) return;
    167168          i=f;
    168169        }
     
    176177    if (f.inZ())
    177178    {
    178       if (0==cf_getSmallPrime(start)) return;
     179      if (start==cf_getNumSmallPrimes()) return;
    179180      while((!f.isZero()) && (mod(f,cf_getSmallPrime(start))==0))
    180181      {
    181182        start++;
    182         if (0==cf_getSmallPrime(start)) return;
     183        if (start==cf_getNumSmallPrimes()) return;
    183184      }
    184185    }
     
    271272          find_good_prime(U0,i);
    272273          find_good_prime(U,i);
    273           int p=cf_getSmallPrime(i);
     274          int p;
     275          if (i==cf_getNumSmallPrimes()) p=0;
     276          else p=cf_getSmallPrime(i);
    274277          //printf("found:p=%d (%d)\n",p,i);
    275278          if (p==0)
     
    283286            prime_number=i;
    284287          }
    285           else prime_number++;
     288          else prime_number++;
    286289          // p!=0:
    287290          modpk bb=coeffBound_old(U0,p);
Note: See TracChangeset for help on using the changeset viewer.