Changeset 73a9ffb in git
- Timestamp:
- May 26, 2011, 10:29:03 AM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 488808e90a9444d2ce5d16be059643fdd2e8629e
- Parents:
- e676cdf123bc41ae953d7fd58106263f5fd02d0c
- git-author:
- Frank Seelisch <seelisch@mathematik.uni-kl.de>2011-05-26 10:29:03+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:36:53+01:00
- Location:
- libpolys
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
re676cd r73a9ffb 217 217 unsigned long mod2mMask; 218 218 #endif 219 int ch; /* characteristic, rInit 220 PLEASE DOCUMENT HERE when this will be negative! */ 219 int ch; /* characteristic, set by the local *InitChar methods; 220 In field extensions or extensions towers, the 221 characteristic can be accessed from any of the 222 intermediate extension fields, i.e., in this case 223 it is redundant along the chain of field extensions; 224 CONTRARY to SINGULAR as it was, we do NOT LONGER use 225 negative values for ch. */ 221 226 222 227 short float_len; /* additional char-flags, rInit */ … … 459 464 return (r->ringtype == 0) && 460 465 ((getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt)) && 461 (r->ch < -1);466 (r->ch != 0); 462 467 } 463 468 … … 469 474 return (r->ringtype == 0) && 470 475 ((getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt)) && 471 (r->ch < -1 ) && (-(r->ch)== p);476 (r->ch != 0) && (r->ch == p); 472 477 } 473 478 -
libpolys/coeffs/ffields.cc
re676cd r73a9ffb 813 813 // the variables: 814 814 r->nNULL = (number)0; 815 assume( r->type== n_GF );815 assume( getCoeffType(r) == n_GF ); 816 816 817 817 GFInfo* p = (GFInfo *)(parameter); -
libpolys/coeffs/gnumpc.cc
re676cd r73a9ffb 378 378 assume( getCoeffType(n) == ID ); 379 379 n->cfKillChar = ndKillChar; /* dummy */ 380 n->ch = 0; 380 381 381 382 n->cfDelete = ngcDelete; -
libpolys/coeffs/gnumpfl.cc
re676cd r73a9ffb 385 385 assume( getCoeffType(n) == ID ); 386 386 n->cfKillChar = ndKillChar; /* dummy */ 387 387 n->ch = 0; 388 388 389 n->cfDelete = ngfDelete; 389 390 n->cfNormalize=ndNormalize; -
libpolys/coeffs/longrat.cc
re676cd r73a9ffb 111 111 #define MPZ_EXACTDIV(A,B,C) mpz_divexact((A),(B),(C)) 112 112 113 /// Our Type! 114 static const n_coeffType ID = n_Q; 115 113 116 void _nlDelete_NoImm(number *a); 114 115 static const n_coeffType ID = n_long_R;116 117 117 118 /*************************************************************** … … 2545 2546 BOOLEAN nlInitChar(coeffs r, void* p) 2546 2547 { 2547 const int ch = (int)(long)(p); 2548 assume( getCoeffType(r) == ID ); 2549 //const int ch = (int)(long)(p); 2548 2550 2549 2551 r->cfKillChar=NULL; -
libpolys/coeffs/modulop.cc
re676cd r73a9ffb 23 23 // int npGen=0; 24 24 25 /// Our Type! 26 static const n_coeffType ID = n_Zp; 25 27 26 28 BOOLEAN npGreaterZero (number k, const coeffs r) … … 329 331 BOOLEAN npInitChar(coeffs r, void* p) 330 332 { 333 assume( getCoeffType(r) == ID ); 331 334 const int c = (int) (long) p; 332 335 -
libpolys/coeffs/numbers.cc
re676cd r73a9ffb 74 74 { 75 75 int c = n_GetChar(r); 76 printf("### c = %d\n", c); 76 77 BOOLEAN ret = n_IsZero(a, r); 77 78 if( (c != 0) && !ret ) -
libpolys/coeffs/rintegers.cc
re676cd r73a9ffb 22 22 #include "si_gmp.h" 23 23 24 /// Our Type! 25 static const n_coeffType ID = n_Z; 24 26 25 27 omBin gmp_nrz_bin = omGetSpecBin(sizeof(mpz_t)); … … 381 383 BOOLEAN nrzInitChar(coeffs r, void * parameter) 382 384 { 385 assume( getCoeffType(r) == ID ); 383 386 r->cfSetChar= NULL; 384 387 r->nCoeffIsEqual = ndCoeffIsEqual; … … 425 428 426 429 r->nNULL = 0; 427 r-> type = n_Z;430 r->ch = 0; 428 431 r->ringtype = 4; 429 432 r->has_simple_Alloc=FALSE; -
libpolys/coeffs/rmodulo2m.cc
re676cd r73a9ffb 24 24 #include <string.h> 25 25 26 /// Our Type! 27 static const n_coeffType ID = n_Z2m; 28 26 29 extern omBin gmp_nrz_bin; /* init in rintegers*/ 27 30 … … 44 47 BOOLEAN nr2mInitChar (coeffs r, void* p) 45 48 { 49 assume( getCoeffType(r) == ID ); 46 50 nr2mInitExp((int)(long)(p), r); 47 51 r->cfKillChar = ndKillChar; /* dummy*/ … … 49 53 50 54 r->ringtype = 1; 51 r->type = n_Z2m; 55 56 /* next cast may yield an overflow as mod2mMask is an unsigned long */ 57 r->ch = (int)r->mod2mMask + 1; 52 58 53 59 r->cfInit = nr2mInit; … … 640 646 else 641 647 { 642 /* code unexpectedly called with m = 1; we go onwith m = 2: */648 /* code unexpectedly called with m = 1; we continue with m = 2: */ 643 649 r->mod2mMask = 3; /* i.e., '11' in binary representation */ 644 650 } 645 r->ch = r->mod2mMask + 1;646 651 } 647 652 … … 650 655 nr2mSetExp(m, r); 651 656 if (m < 2) 652 WarnS("nr2mInitExp unexpectedly called with m = 1 (we go onwith Z/2^2");657 WarnS("nr2mInitExp unexpectedly called with m = 1 (we continue with Z/2^2"); 653 658 } 654 659 -
libpolys/coeffs/rmodulon.cc
re676cd r73a9ffb 24 24 #include <string.h> 25 25 26 /// Our Type! 27 static const n_coeffType ID = n_Zn; 28 26 29 extern omBin gmp_nrz_bin; 27 30 … … 45 48 BOOLEAN nrnInitChar (coeffs r, void* p) 46 49 { 47 50 assume( getCoeffType(r) == ID ); 48 51 nrnInitExp((int)(long)(p), r); 49 52 r->ringtype = 2; 50 r->type = n_Zn; 53 54 /* next computation may yield wrong characteristic as r->modNumber 55 is a GMP number */ 56 r->ch = mpz_get_ui(r->modNumber); 51 57 52 58 r->cfInit = nrnInit; -
libpolys/coeffs/shortfl.cc
re676cd r73a9ffb 546 546 assume( getCoeffType(n) == ID ); 547 547 n->cfKillChar = ndKillChar; /* dummy */ 548 n->ch = 0; 548 549 549 550 n->cfInit = nrInit; -
libpolys/polys/ext_fields/algext.cc
re676cd r73a9ffb 37 37 38 38 #include <polys/ext_fields/algext.h> 39 40 /// our type has been defined as a macro in algext.h 41 /// and is accessible by 'naID' 39 42 40 43 /// forward declarations … … 569 572 BOOLEAN naInitChar(coeffs cf, void * infoStruct) 570 573 { 574 assume( getCoeffType(cf) == naID ); 575 571 576 ExtInfo *e = (ExtInfo *)infoStruct; 572 577 /// first check whether cf->algring != NULL and delete old ring??? … … 581 586 assume(getCoeffType(cf) == naID); // coeff type; 582 587 583 cf->ch = -cf->algring->cf->ch; /* propagate characteristic up so that it 584 becomes directly accessible in cf; 585 negative sign to signal that it's an 586 extension field */ 588 /* propagate characteristic up so that it becomes 589 directly accessible in cf: */ 590 cf->ch = cf->algring->cf->ch; 587 591 588 592 #ifdef LDEBUG
Note: See TracChangeset
for help on using the changeset viewer.