Changeset 35a153 in git for factory/cf_char.cc


Ignore:
Timestamp:
Jul 25, 2019, 2:45:06 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
31b296e9bebe3be046b485f2f8f09ba1c0139fc2
Parents:
3d5b277e2651a792f826b544d03d7179c438dba0
Message:
opt: setCharacteristic
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_char.cc

    r3d5b277 r35a153  
    3333        theDegree = 1;
    3434        CFFactory::settype( FiniteFieldDomain );
     35        ff_big = c > cf_getSmallPrime( cf_getNumSmallPrimes()-1 );
     36        if (c!=theCharacteristic)
     37        {
     38          if (c > 536870909) factoryError("characteristic is too large(max is 2^29)");
     39          ff_setprime( c );
     40        }
    3541        theCharacteristic = c;
    36         ff_big = c > cf_getSmallPrime( cf_getNumSmallPrimes()-1 );
    37         if (c > 536870909) factoryError("characteristic is too large(max is 2^29)");
    38         ff_setprime( c );
    3942    }
    4043}
Note: See TracChangeset for help on using the changeset viewer.