Changeset 493225 in git for factory/fac_multivar.cc


Ignore:
Timestamp:
Dec 8, 2009, 7:11:06 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
32c11ff616c40bb7c3d5c756479b0507e505f330
Parents:
42660f97810c6af10af57af395d99b9a04bb8dad
Message:
nWrite indep. from currRing

git-svn-id: file:///usr/local/Singular/svn/trunk@12377 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/fac_multivar.cc

    r42660f r493225  
    157157      {
    158158        find_good_prime(i.coeff(),start);
     159        if (0==cf_getSmallPrime(start)) return;
    159160        if((i.exp()!=0) && ((i.exp() % cf_getSmallPrime(start))==0))
    160161        {
     
    171172    if (f.inZ())
    172173    {
    173       while((f!=0) && (mod(f,cf_getSmallPrime(start))==0))
     174      if (0==cf_getSmallPrime(start)) return;
     175      while((!f.isZero()) && (mod(f,cf_getSmallPrime(start))==0))
    174176      {
    175177        start++;
     178        if (0==cf_getSmallPrime(start)) return;
    176179      }
    177180    }
     
    266269          int p=cf_getSmallPrime(i);
    267270          //printf("found:p=%d (%d)\n",p,i);
    268           if ((i==0)||(i!=prime_number))
     271          if (p==0)
     272          {
     273            printf("out of primes - switch ot non-NTL\n");
     274            // non-NTL stuff
     275             b = coeffBound( U, getZFacModulus().getp() );
     276             if ( getZFacModulus().getpk() > b.getpk() )
     277                b = getZFacModulus();
     278          }
     279          else if (((i==0)||(i!=prime_number)))
    269280          {
    270281            b = coeffBound( U, p );
    271282            prime_number=i;
    272283          }
    273           modpk bb=coeffBound(U0,p);
    274           if (bb.getk() > b.getk() ) b=bb;
    275           bb=coeffBound(arg,p);
    276           if (bb.getk() > b.getk() ) b=bb;
     284          if (p!=0)
     285          {
     286            modpk bb=coeffBound(U0,p);
     287            if (bb.getk() > b.getk() ) b=bb;
     288            bb=coeffBound(arg,p);
     289            if (bb.getk() > b.getk() ) b=bb;
     290          }
    277291        }
    278292        #else
Note: See TracChangeset for help on using the changeset viewer.