Changeset d09118 in git for factory/cf_char.cc
- Timestamp:
- Aug 18, 2008, 12:36:24 PM (15 years ago)
- Branches:
- (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
- Children:
- 9539de640ccfecf479ba6edae20d859c36821801
- Parents:
- 6b55c7daa25948ba8f1c11c48911c50daca86b98
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_char.cc
r6b55c7 rd09118 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_char.cc,v 1. 7 2002-03-08 10:31:45Singular Exp $ */2 /* $Id: cf_char.cc,v 1.8 2008-08-18 10:36:24 Singular Exp $ */ 3 3 4 4 #include <config.h> … … 25 25 void setCharacteristic( int c ) 26 26 { 27 if ( c == 0 ) { 28 theDegree = 0; 29 CFFactory::settype( IntegerDomain ); 30 theCharacteristic = 0; 27 if ( c == 0 ) 28 { 29 theDegree = 0; 30 CFFactory::settype( IntegerDomain ); 31 theCharacteristic = 0; 31 32 } 32 else { 33 theDegree = 1; 34 CFFactory::settype( FiniteFieldDomain ); 35 theCharacteristic = c; 36 ff_big = c > cf_getSmallPrime( cf_getNumSmallPrimes()-1 ); 37 ff_setprime( c ); 38 resetFPT(); 33 else 34 { 35 theDegree = 1; 36 CFFactory::settype( FiniteFieldDomain ); 37 theCharacteristic = c; 38 ff_big = c > cf_getSmallPrime( cf_getNumSmallPrimes()-1 ); 39 #ifdef SINGULAR 40 extern int errorreported; 41 void WerrorS(const char *s); 42 if (!errorreported && (c > 536870909)) WerrorS("characteristic too large(max is 2^29)"); 43 #endif 44 ff_setprime( c ); 45 resetFPT(); 39 46 } 40 47 }
Note: See TracChangeset
for help on using the changeset viewer.