Changeset 6d0515d in git
- Timestamp:
- Aug 12, 2016, 11:02:18 AM (8 years ago)
- Branches:
- (u'spielwiese', '52dcfddee5ec87d404d5e0fb44f2d627608208f1')
- Children:
- 16120ff86476199d17c69372277e4f74d645bad8
- Parents:
- 75b12a8379e8fdc352f1ced846ad6cb2ee44ec22
- Location:
- libpolys
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/gnumpc.cc
r75b12a r6d0515d 68 68 // number ngcMapQ(number from, const coeffs r, const coeffs aRing); 69 69 70 /// Our Type!71 static const n_coeffType ID = n_long_C;72 73 74 70 #ifdef LDEBUG 75 71 // not yet implemented 76 72 BOOLEAN ngcDBTest(number, const char *, const int, const coeffs r) 77 73 { 78 assume( getCoeffType(r) == ID);74 assume( getCoeffType(r) == n_long_C ); 79 75 80 76 return TRUE; … … 84 80 number ngcParameter(int i, const coeffs r) 85 81 { 86 assume( getCoeffType(r) == ID);82 assume( getCoeffType(r) == n_long_C ); 87 83 assume(i==1); 88 84 … … 98 94 number ngcInit (long i, const coeffs r) 99 95 { 100 assume( getCoeffType(r) == ID);96 assume( getCoeffType(r) == n_long_C ); 101 97 102 98 gmp_complex* n= new gmp_complex( (long)i, 0L ); … … 110 106 long ngcInt(number &i, const coeffs r) 111 107 { 112 assume( getCoeffType(r) == ID);108 assume( getCoeffType(r) == n_long_C ); 113 109 114 110 return ((gmp_complex*)i)->real(); … … 135 131 void ngcDelete (number * a, const coeffs r) 136 132 { 137 assume( getCoeffType(r) == ID);133 assume( getCoeffType(r) == n_long_C ); 138 134 139 135 if ( *a != NULL ) … … 149 145 number ngcCopy(number a, const coeffs r) 150 146 { 151 assume( getCoeffType(r) == ID);147 assume( getCoeffType(r) == n_long_C ); 152 148 153 149 gmp_complex* b= new gmp_complex( *(gmp_complex*)a ); … … 161 157 number ngcNeg (number a, const coeffs R) 162 158 { 163 assume( getCoeffType(R) == ID);159 assume( getCoeffType(R) == n_long_C ); 164 160 165 161 gmp_complex* r=(gmp_complex*)a; … … 173 169 number ngcInvers(number a, const coeffs R) 174 170 { 175 assume( getCoeffType(R) == ID);171 assume( getCoeffType(R) == n_long_C ); 176 172 177 173 gmp_complex* r = NULL; … … 192 188 number ngcAdd (number a, number b, const coeffs R) 193 189 { 194 assume( getCoeffType(R) == ID);190 assume( getCoeffType(R) == n_long_C ); 195 191 196 192 gmp_complex* r= new gmp_complex( (*(gmp_complex*)a) + (*(gmp_complex*)b) ); … … 203 199 number ngcSub (number a, number b, const coeffs R) 204 200 { 205 assume( getCoeffType(R) == ID);201 assume( getCoeffType(R) == n_long_C ); 206 202 207 203 gmp_complex* r= new gmp_complex( (*(gmp_complex*)a) - (*(gmp_complex*)b) ); … … 214 210 number ngcMult (number a, number b, const coeffs R) 215 211 { 216 assume( getCoeffType(R) == ID);212 assume( getCoeffType(R) == n_long_C ); 217 213 218 214 gmp_complex* r= new gmp_complex( (*(gmp_complex*)a) * (*(gmp_complex*)b) ); … … 225 221 number ngcDiv (number a, number b, const coeffs r) 226 222 { 227 assume( getCoeffType(r) == ID);223 assume( getCoeffType(r) == n_long_C ); 228 224 229 225 if (((gmp_complex*)b)->isZero()) … … 242 238 void ngcPower ( number x, int exp, number * u, const coeffs r) 243 239 { 244 assume( getCoeffType(r) == ID);240 assume( getCoeffType(r) == n_long_C ); 245 241 246 242 if ( exp == 0 ) … … 287 283 BOOLEAN ngcIsZero (number a, const coeffs r) 288 284 { 289 assume( getCoeffType(r) == ID);285 assume( getCoeffType(r) == n_long_C ); 290 286 291 287 return ( ((gmp_complex*)a)->real().isZero() && ((gmp_complex*)a)->imag().isZero()); … … 294 290 number ngcRePart(number a, const coeffs r) 295 291 { 296 assume( getCoeffType(r) == ID);292 assume( getCoeffType(r) == n_long_C ); 297 293 298 294 gmp_complex* n = new gmp_complex(((gmp_complex*)a)->real()); … … 302 298 number ngcImPart(number a, const coeffs r) 303 299 { 304 assume( getCoeffType(r) == ID);300 assume( getCoeffType(r) == n_long_C ); 305 301 306 302 gmp_complex* n = new gmp_complex(((gmp_complex*)a)->imag()); … … 313 309 BOOLEAN ngcGreaterZero (number a, const coeffs r) 314 310 { 315 assume( getCoeffType(r) == ID);311 assume( getCoeffType(r) == n_long_C ); 316 312 317 313 if ( ! ((gmp_complex*)a)->imag().isZero() ) … … 326 322 BOOLEAN ngcGreater (number a, number b, const coeffs r) 327 323 { 328 assume( getCoeffType(r) == ID);324 assume( getCoeffType(r) == n_long_C ); 329 325 330 326 gmp_complex *aa=(gmp_complex*)a; … … 338 334 BOOLEAN ngcEqual (number a, number b, const coeffs r) 339 335 { 340 assume( getCoeffType(r) == ID);336 assume( getCoeffType(r) == n_long_C ); 341 337 342 338 gmp_complex *aa=(gmp_complex*)a; … … 350 346 BOOLEAN ngcIsOne (number a, const coeffs r) 351 347 { 352 assume( getCoeffType(r) == ID);348 assume( getCoeffType(r) == n_long_C ); 353 349 354 350 return (((gmp_complex*)a)->real().isOne() && ((gmp_complex*)a)->imag().isZero()); … … 361 357 BOOLEAN ngcIsMOne (number a, const coeffs r) 362 358 { 363 assume( getCoeffType(r) == ID);359 assume( getCoeffType(r) == n_long_C ); 364 360 365 361 return (((gmp_complex*)a)->real().isMOne() && ((gmp_complex*)a)->imag().isZero()); … … 372 368 const char * ngcRead (const char * s, number * a, const coeffs r) 373 369 { 374 assume( getCoeffType(r) == ID);370 assume( getCoeffType(r) == n_long_C ); 375 371 const char * const complex_parameter = n_ParameterNames(r)[0]; 376 372 assume( complex_parameter != NULL ); … … 405 401 void ngcWrite (number a, const coeffs r) 406 402 { 407 assume( getCoeffType(r) == ID);403 assume( getCoeffType(r) == n_long_C ); 408 404 409 405 if (a==NULL) … … 421 417 BOOLEAN ngcCoeffIsEqual (const coeffs r, n_coeffType n, void * parameter) 422 418 { 423 if (n== ID)419 if (n==n_long_C) 424 420 { 425 421 LongComplexInfo* p = (LongComplexInfo *)(parameter); … … 464 460 BOOLEAN ngcInitChar(coeffs n, void* parameter) 465 461 { 466 assume( getCoeffType(n) == ID);462 assume( getCoeffType(n) == n_long_C ); 467 463 n->is_field=TRUE; 468 464 n->is_domain=TRUE; … … 613 609 number ngcMapQ(number from, const coeffs aRing, const coeffs r) 614 610 { 615 assume( getCoeffType(r) == ID);611 assume( getCoeffType(r) == n_long_C ); 616 612 assume( aRing->rep == n_rep_gap_rat); 617 613 … … 627 623 number ngcMapZ(number from, const coeffs aRing, const coeffs r) 628 624 { 629 assume( getCoeffType(r) == ID);625 assume( getCoeffType(r) == n_long_C ); 630 626 assume( aRing->rep == n_rep_gap_gmp); 631 627 … … 648 644 static number ngcMapLongR(number from, const coeffs aRing, const coeffs r) 649 645 { 650 assume( getCoeffType(r) == ID);646 assume( getCoeffType(r) == n_long_C ); 651 647 assume( getCoeffType(aRing) == n_long_R ); 652 648 … … 662 658 static number ngcMapR(number from, const coeffs aRing, const coeffs r) 663 659 { 664 assume( getCoeffType(r) == ID);660 assume( getCoeffType(r) == n_long_C ); 665 661 assume( getCoeffType(aRing) == n_R ); 666 662 … … 676 672 static number ngcMapP(number from, const coeffs aRing, const coeffs r) 677 673 { 678 assume( getCoeffType(r) == ID);674 assume( getCoeffType(r) == n_long_C ); 679 675 assume( getCoeffType(aRing) == n_Zp ); 680 676 … … 687 683 static number ngcCopyMap(number from, const coeffs aRing, const coeffs r) 688 684 { 689 assume( getCoeffType(r) == ID);690 assume( getCoeffType(aRing) == ID);685 assume( getCoeffType(r) == n_long_C ); 686 assume( getCoeffType(aRing) == n_long_C ); 691 687 692 688 gmp_complex* b = NULL; … … 701 697 nMapFunc ngcSetMap(const coeffs src, const coeffs dst) 702 698 { 703 assume( getCoeffType(dst) == ID);699 assume( getCoeffType(dst) == n_long_C ); 704 700 705 701 if (src->rep==n_rep_gap_rat) /* Q, Z*/ -
libpolys/coeffs/gnumpfl.cc
r75b12a r6d0515d 23 23 24 24 //ring ngfMapRing; // to be used also in gnumpc.cc 25 26 /// Our Type!27 static const n_coeffType ID = n_long_R;28 25 29 26 /// Get a mapping function from src into the domain of this type: … … 73 70 number ngfInit (long i, const coeffs r) 74 71 { 75 assume( getCoeffType(r) == ID);72 assume( getCoeffType(r) == n_long_R ); 76 73 77 74 gmp_float* n= new gmp_float( (double)i ); … … 84 81 long ngfInt(number &i, const coeffs r) 85 82 { 86 assume( getCoeffType(r) == ID);83 assume( getCoeffType(r) == n_long_R ); 87 84 88 85 double d=(double)*(gmp_float*)i; … … 109 106 void ngfDelete (number * a, const coeffs r) 110 107 { 111 assume( getCoeffType(r) == ID);108 assume( getCoeffType(r) == n_long_R ); 112 109 113 110 if ( *a != NULL ) … … 123 120 number ngfCopy(number a, const coeffs r) 124 121 { 125 assume( getCoeffType(r) == ID);122 assume( getCoeffType(r) == n_long_R ); 126 123 127 124 gmp_float* b= new gmp_float( *(gmp_float*)a ); … … 132 129 static number ngfCopyMap(number a, const coeffs r1, const coeffs r2) 133 130 { 134 assume( getCoeffType(r1) == ID);135 assume( getCoeffType(r2) == ID);131 assume( getCoeffType(r1) == n_long_R ); 132 assume( getCoeffType(r2) == n_long_R ); 136 133 137 134 gmp_float* b= NULL; … … 149 146 number ngfNeg (number a, const coeffs r) 150 147 { 151 assume( getCoeffType(r) == ID);148 assume( getCoeffType(r) == n_long_R ); 152 149 153 150 *(gmp_float*)a= -(*(gmp_float*)a); … … 160 157 number ngfInvers(number a, const coeffs r) 161 158 { 162 assume( getCoeffType(r) == ID);159 assume( getCoeffType(r) == n_long_R ); 163 160 164 161 gmp_float* f= NULL; … … 179 176 number ngfAdd (number a, number b, const coeffs R) 180 177 { 181 assume( getCoeffType(R) == ID);178 assume( getCoeffType(R) == n_long_R ); 182 179 183 180 gmp_float* r= new gmp_float( (*(gmp_float*)a) + (*(gmp_float*)b) ); … … 190 187 number ngfSub (number a, number b, const coeffs R) 191 188 { 192 assume( getCoeffType(R) == ID);189 assume( getCoeffType(R) == n_long_R ); 193 190 194 191 gmp_float* r= new gmp_float( (*(gmp_float*)a) - (*(gmp_float*)b) ); … … 201 198 number ngfMult (number a, number b, const coeffs R) 202 199 { 203 assume( getCoeffType(R) == ID);200 assume( getCoeffType(R) == n_long_R ); 204 201 205 202 gmp_float* r= new gmp_float( (*(gmp_float*)a) * (*(gmp_float*)b) ); … … 212 209 number ngfDiv (number a, number b, const coeffs r) 213 210 { 214 assume( getCoeffType(r) == ID);211 assume( getCoeffType(r) == n_long_R ); 215 212 216 213 if ( ((gmp_float*)b)->isZero() ) … … 229 226 number ngfPower (number x, int exp, const coeffs r) 230 227 { 231 assume( getCoeffType(r) == ID);228 assume( getCoeffType(r) == n_long_R ); 232 229 233 230 if ( exp == 0 ) … … 255 252 BOOLEAN ngfIsZero (number a, const coeffs r) 256 253 { 257 assume( getCoeffType(r) == ID);254 assume( getCoeffType(r) == n_long_R ); 258 255 259 256 return ( ((gmp_float*)a)->isZero() ); … … 265 262 BOOLEAN ngfGreaterZero (number a, const coeffs r) 266 263 { 267 assume( getCoeffType(r) == ID);264 assume( getCoeffType(r) == n_long_R ); 268 265 269 266 return (((gmp_float*)a)->sign() > 0); … … 275 272 BOOLEAN ngfGreater (number a, number b, const coeffs r) 276 273 { 277 assume( getCoeffType(r) == ID);274 assume( getCoeffType(r) == n_long_R ); 278 275 279 276 return ( (*(gmp_float*)a) > (*(gmp_float*)b) ); … … 285 282 BOOLEAN ngfEqual (number a, number b, const coeffs r) 286 283 { 287 assume( getCoeffType(r) == ID);284 assume( getCoeffType(r) == n_long_R ); 288 285 289 286 return ( (*(gmp_float*)a) == (*(gmp_float*)b) ); … … 295 292 BOOLEAN ngfIsOne (number a, const coeffs r) 296 293 { 297 assume( getCoeffType(r) == ID);294 assume( getCoeffType(r) == n_long_R ); 298 295 299 296 return ((gmp_float*)a)->isOne(); … … 305 302 BOOLEAN ngfIsMOne (number a, const coeffs r) 306 303 { 307 assume( getCoeffType(r) == ID);304 assume( getCoeffType(r) == n_long_R ); 308 305 309 306 return ((gmp_float*)a)->isMOne(); … … 341 338 const char * ngfRead (const char * start, number * a, const coeffs r) 342 339 { 343 assume( getCoeffType(r) == IDor getCoeffType(r) == n_long_C);340 assume( getCoeffType(r) == n_long_R or getCoeffType(r) == n_long_C); 344 341 345 342 char *s= (char *)start; … … 400 397 void ngfWrite (number a, const coeffs r) 401 398 { 402 assume( getCoeffType(r) == ID);399 assume( getCoeffType(r) == n_long_R ); 403 400 404 401 char *out; … … 418 415 BOOLEAN ngfCoeffIsEqual (const coeffs r, n_coeffType n, void * parameter) 419 416 { 420 if (n== ID)417 if (n==n_long_R) 421 418 { 422 419 LongComplexInfo* p = (LongComplexInfo *)(parameter); … … 443 440 BOOLEAN ngfInitChar(coeffs n, void *parameter) 444 441 { 445 assume( getCoeffType(n) == ID);442 assume( getCoeffType(n) == n_long_R ); 446 443 447 444 n->is_field=TRUE; … … 506 503 number ngfMapQ(number from, const coeffs src, const coeffs dst) 507 504 { 508 assume( getCoeffType(dst) == ID);505 assume( getCoeffType(dst) == n_long_R ); 509 506 assume( src->rep == n_rep_gap_rat ); 510 507 … … 514 511 number ngfMapZ(number from, const coeffs aRing, const coeffs r) 515 512 { 516 assume( getCoeffType(r) == ID);513 assume( getCoeffType(r) == n_long_R ); 517 514 assume( aRing->rep == n_rep_gap_gmp); 518 515 … … 536 533 static number ngfMapR(number from, const coeffs src, const coeffs dst) 537 534 { 538 assume( getCoeffType(dst) == ID);535 assume( getCoeffType(dst) == n_long_R ); 539 536 assume( getCoeffType(src) == n_R ); 540 537 … … 545 542 static number ngfMapP(number from, const coeffs src, const coeffs dst) 546 543 { 547 assume( getCoeffType(dst) == ID);544 assume( getCoeffType(dst) == n_long_R ); 548 545 assume( getCoeffType(src) == n_Zp ); 549 546 … … 553 550 static number ngfMapC(number from, const coeffs src, const coeffs dst) 554 551 { 555 assume( getCoeffType(dst) == ID);552 assume( getCoeffType(dst) == n_long_R ); 556 553 assume( getCoeffType(src) == n_long_C ); 557 554 … … 562 559 nMapFunc ngfSetMap(const coeffs src, const coeffs dst) 563 560 { 564 assume( getCoeffType(dst) == ID);561 assume( getCoeffType(dst) == n_long_R ); 565 562 566 563 if (src->rep==n_rep_gap_rat) /*Q, Z*/ -
libpolys/coeffs/modulop.cc
r75b12a r6d0515d 24 24 25 25 #include <string.h> 26 27 /// Our Type!28 static const n_coeffType ID = n_Zp;29 26 30 27 BOOLEAN npGreaterZero (number k, const coeffs r); … … 76 73 static inline number nvMultM(number a, number b, const coeffs r) 77 74 { 78 assume( getCoeffType(r) == ID);75 assume( getCoeffType(r) == n_Zp ); 79 76 80 77 #if SIZEOF_LONG == 4 … … 498 495 BOOLEAN npInitChar(coeffs r, void* p) 499 496 { 500 assume( getCoeffType(r) == ID);497 assume( getCoeffType(r) == n_Zp ); 501 498 const int c = (int) (long) p; 502 499 -
libpolys/coeffs/rintegers.cc
r75b12a r6d0515d 28 28 #ifdef HAVE_RINGS 29 29 30 31 /// Our Type!32 static const n_coeffType ID = n_Z;33 30 34 31 number nrzCopy (number a, const coeffs r); … … 487 484 BOOLEAN nrzInitChar(coeffs r, void *) 488 485 { 489 assume( getCoeffType(r) == ID);486 assume( getCoeffType(r) == n_Z ); 490 487 491 488 r->is_field=FALSE; … … 1710 1707 BOOLEAN nrzInitChar(coeffs r, void *) 1711 1708 { 1712 assume( getCoeffType(r) == ID);1709 assume( getCoeffType(r) == n_Z ); 1713 1710 1714 1711 r->is_field=FALSE; -
libpolys/coeffs/rmodulo2m.cc
r75b12a r6d0515d 24 24 25 25 #ifdef HAVE_RINGS 26 27 /// Our Type!28 static const n_coeffType ID = n_Z2m;29 26 30 27 number nr2mCopy (number a, const coeffs r); … … 160 157 BOOLEAN nr2mInitChar (coeffs r, void* p) 161 158 { 162 assume( getCoeffType(r) == ID);159 assume( getCoeffType(r) == n_Z2m ); 163 160 nr2mInitExp((int)(long)(p), r); 164 161 -
libpolys/coeffs/rmodulon.cc
r75b12a r6d0515d 23 23 24 24 #ifdef HAVE_RINGS 25 26 /// Our Type!27 static const n_coeffType ID = n_Zn;28 static const n_coeffType ID2 = n_Znm;29 25 30 26 number nrnCopy (number a, const coeffs r); … … 163 159 BOOLEAN nrnInitChar (coeffs r, void* p) 164 160 { 165 assume( (getCoeffType(r) == ID) || (getCoeffType (r) == ID2) );161 assume( (getCoeffType(r) == n_Zn) || (getCoeffType (r) == n_Znm) ); 166 162 ZnmInfo * info= (ZnmInfo *) p; 167 163 r->modBase= (mpz_ptr)nrnCopy((number)info->base, r); //this circumvents the problem -
libpolys/coeffs/shortfl.cc
r75b12a r6d0515d 23 23 #include <string.h> 24 24 #include <math.h> 25 26 /// Our Type!27 static const n_coeffType ID = n_R;28 25 29 26 // Private interface should be hidden!!! … … 84 81 void nrCoeffWrite (const coeffs r, BOOLEAN /*details*/) 85 82 { 86 assume( getCoeffType(r) == ID);83 assume( getCoeffType(r) == n_R ); 87 84 PrintS("// characteristic : 0 (real)\n"); /* R */ 88 85 } … … 91 88 BOOLEAN nrGreaterZero (number k, const coeffs r) 92 89 { 93 assume( getCoeffType(r) == ID);90 assume( getCoeffType(r) == n_R ); 94 91 95 92 return nf(k).F() >= 0.0; … … 98 95 number nrMult (number a,number b, const coeffs r) 99 96 { 100 assume( getCoeffType(r) == ID);97 assume( getCoeffType(r) == n_R ); 101 98 102 99 return nf(nf(a).F() * nf(b).F()).N(); … … 108 105 number nrInit (long i, const coeffs r) 109 106 { 110 assume( getCoeffType(r) == ID);107 assume( getCoeffType(r) == n_R ); 111 108 112 109 float f = (float)i; … … 119 116 long nrInt(number &n, const coeffs r) 120 117 { 121 assume( getCoeffType(r) == ID);118 assume( getCoeffType(r) == n_R ); 122 119 123 120 long i; … … 144 141 number nrAdd (number a, number b, const coeffs r) 145 142 { 146 assume( getCoeffType(r) == ID);143 assume( getCoeffType(r) == n_R ); 147 144 148 145 float x = nf(a).F(); … … 176 173 number nrSub (number a, number b, const coeffs r) 177 174 { 178 assume( getCoeffType(r) == ID);175 assume( getCoeffType(r) == n_R ); 179 176 180 177 float x = nf(a).F(); … … 208 205 BOOLEAN nrIsZero (number a, const coeffs r) 209 206 { 210 assume( getCoeffType(r) == ID);207 assume( getCoeffType(r) == n_R ); 211 208 212 209 return (0.0 == nf(a).F()); … … 215 212 BOOLEAN nrIsOne (number a, const coeffs r) 216 213 { 217 assume( getCoeffType(r) == ID);214 assume( getCoeffType(r) == n_R ); 218 215 219 216 float aa=nf(a).F()-1.0; … … 224 221 BOOLEAN nrIsMOne (number a, const coeffs r) 225 222 { 226 assume( getCoeffType(r) == ID);223 assume( getCoeffType(r) == n_R ); 227 224 228 225 float aa=nf(a).F()+1.0; … … 233 230 number nrDiv (number a,number b, const coeffs r) 234 231 { 235 assume( getCoeffType(r) == ID);232 assume( getCoeffType(r) == n_R ); 236 233 237 234 float n = nf(b).F(); … … 247 244 number nrInvers (number c, const coeffs r) 248 245 { 249 assume( getCoeffType(r) == ID);246 assume( getCoeffType(r) == n_R ); 250 247 251 248 float n = nf(c).F(); … … 260 257 number nrNeg (number c, const coeffs r) 261 258 { 262 assume( getCoeffType(r) == ID);259 assume( getCoeffType(r) == n_R ); 263 260 264 261 return nf(-nf(c).F()).N(); … … 267 264 BOOLEAN nrGreater (number a,number b, const coeffs r) 268 265 { 269 assume( getCoeffType(r) == ID);266 assume( getCoeffType(r) == n_R ); 270 267 271 268 return nf(a).F() > nf(b).F(); … … 274 271 BOOLEAN nrEqual (number a,number b, const coeffs r) 275 272 { 276 assume( getCoeffType(r) == ID);273 assume( getCoeffType(r) == n_R ); 277 274 278 275 number x = nrSub(a,b,r); … … 282 279 void nrWrite (number a, const coeffs r) 283 280 { 284 assume( getCoeffType(r) == ID);281 assume( getCoeffType(r) == n_R ); 285 282 286 283 char ch[11]; … … 304 301 void nrPower (number a, int i, number * result, const coeffs r) 305 302 { 306 assume( getCoeffType(r) == ID);303 assume( getCoeffType(r) == n_R ); 307 304 308 305 if (i==0) … … 345 342 { 346 343 347 assume( getCoeffType(r) == ID);344 assume( getCoeffType(r) == n_R ); 348 345 349 346 static const char *nIllegalChar="illegal character in number"; … … 415 412 BOOLEAN nrDBTest(number a, const char *f, const int l, const coeffs r) 416 413 { 417 assume( getCoeffType(r) == ID);414 assume( getCoeffType(r) == n_R ); 418 415 419 416 return TRUE; … … 423 420 static number nrMapP(number from, const coeffs aRing, const coeffs r) 424 421 { 425 assume( getCoeffType(r) == ID);422 assume( getCoeffType(r) == n_R ); 426 423 assume( getCoeffType(aRing) == n_Zp ); 427 424 … … 433 430 static number nrMapLongR(number from, const coeffs aRing, const coeffs r) 434 431 { 435 assume( getCoeffType(r) == ID);432 assume( getCoeffType(r) == n_R ); 436 433 assume( getCoeffType(aRing) == n_long_R ); 437 434 … … 442 439 static number nrMapC(number from, const coeffs aRing, const coeffs r) 443 440 { 444 assume( getCoeffType(r) == ID);441 assume( getCoeffType(r) == n_R ); 445 442 assume( getCoeffType(aRing) == n_long_C ); 446 443 … … 463 460 #define GET_DENOM(A) ((A)->n) 464 461 465 assume( getCoeffType(r) == ID);462 assume( getCoeffType(r) == n_R ); 466 463 assume( aRing->rep == n_rep_gap_rat ); 467 464 … … 538 535 number nrMapZ(number from, const coeffs aRing, const coeffs r) 539 536 { 540 assume( getCoeffType(r) == ID);537 assume( getCoeffType(r) == n_R ); 541 538 assume( aRing->rep == n_rep_gap_gmp ); 542 539 … … 599 596 // #define MPZ_CLEAR mpz_clear 600 597 601 // assume( getCoeffType(r) == ID);598 // assume( getCoeffType(r) == n_R ); 602 599 // assume( getCoeffType(aRing) == n_Q ); 603 600 … … 697 694 nMapFunc nrSetMap(const coeffs src, const coeffs dst) 698 695 { 699 assume( getCoeffType(dst) == ID);696 assume( getCoeffType(dst) == n_R ); 700 697 701 698 if (src->rep==n_rep_gap_rat) /*Q, Z */ … … 733 730 BOOLEAN nrInitChar(coeffs n, void* p) 734 731 { 735 assume( getCoeffType(n) == ID);732 assume( getCoeffType(n) == n_R ); 736 733 737 734 assume( p == NULL ); -
libpolys/polys/ext_fields/transext.cc
r75b12a r6d0515d 77 77 #define ntTest(a) n_Test(a, cf) 78 78 79 /// Our own type!80 static const n_coeffType ID = n_transExt;81 82 79 /* polynomial ring in which the numerators and denominators of our 83 80 numbers live */ … … 175 172 BOOLEAN ntDBTest(number a, const char *f, const int l, const coeffs cf) 176 173 { 177 assume(getCoeffType(cf) == ID);174 assume(getCoeffType(cf) == n_transExt); 178 175 179 176 if (IS0(a)) return TRUE; … … 1594 1591 static BOOLEAN ntCoeffIsEqual(const coeffs cf, n_coeffType n, void * param) 1595 1592 { 1596 if ( ID!= n) return FALSE;1593 if (n_transExt != n) return FALSE; 1597 1594 TransExtInfo *e = (TransExtInfo *)param; 1598 1595 /* for rational function fields we expect the underlying … … 2107 2104 { 2108 2105 /* dst is expected to be a rational function field */ 2109 assume(getCoeffType(dst) == ID);2106 assume(getCoeffType(dst) == n_transExt); 2110 2107 2111 2108 if( src == dst ) return ndCopyMap; … … 2218 2215 static number ntParameter(const int iParameter, const coeffs cf) 2219 2216 { 2220 assume(getCoeffType(cf) == ID);2217 assume(getCoeffType(cf) == n_transExt); 2221 2218 2222 2219 const ring R = cf->extRing; … … 2241 2238 { 2242 2239 ntTest(m); 2243 assume(getCoeffType(cf) == ID);2240 assume(getCoeffType(cf) == n_transExt); 2244 2241 2245 2242 const ring R = cf->extRing; … … 2267 2264 { 2268 2265 assume(cf != NULL); 2269 assume(getCoeffType(cf) == ID);2266 assume(getCoeffType(cf) == n_transExt); 2270 2267 // all coeffs are given by fractions of polynomails over integers!!! 2271 2268 // without denominators!!! … … 2356 2353 { 2357 2354 assume(cf != NULL); 2358 assume(getCoeffType(cf) == ID); // both over Q(a) and Zp(a)!2355 assume(getCoeffType(cf) == n_transExt); // both over Q(a) and Zp(a)! 2359 2356 // all coeffs are given by fractions of polynomails over integers!!! 2360 2357 … … 2549 2546 2550 2547 assume( cf != NULL ); 2551 assume(getCoeffType(cf) == ID); // coeff type;2548 assume(getCoeffType(cf) == n_transExt); // coeff type; 2552 2549 2553 2550 ring R = e->r;
Note: See TracChangeset
for help on using the changeset viewer.