- Timestamp:
- Apr 23, 2021, 11:01:05 AM (3 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 1f547ed4cc617ebefd435098637414a0fabd2084
- Parents:
- 5fd24e69d9cdfcd1040ca93af529563f039efd2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/numbers.cc
r5fd24e6 rbf8b65 119 119 } 120 120 121 static BOOLEAN ndIsUnit (number a, const coeffs r)121 static BOOLEAN ndIsUnit_Ring(number a, const coeffs r) 122 122 { return r->cfIsOne(a,r)|| r->cfIsMOne(a,r); } 123 static number ndGetUnit(number a, const coeffs r) 123 static BOOLEAN ndIsUnit_Field(number a, const coeffs r) 124 { return !r->cfIsZero(a,r); } 125 static number ndGetUnit_Ring(number a, const coeffs r) 124 126 { return r->cfInit(1,r); } 125 127 #ifdef LDEBUG … … 407 409 n->cfClearDenominators = ndClearDenominators; 408 410 409 n->cfIsUnit = ndIsUnit;411 //n->cfIsUnit = ndIsUnit; 410 412 #ifdef HAVE_RINGS 411 413 n->cfDivComp = ndDivComp; 412 414 n->cfDivBy = ndDivBy; 413 415 n->cfExtGcd = ndExtGcd; 414 n->cfGetUnit = ndGetUnit;416 //n->cfGetUnit = ndGetUnit; 415 417 #endif 416 418 … … 438 440 if (n->cfExactDiv==NULL) n->cfExactDiv=n->cfDiv; 439 441 if (n->cfSubringGcd==NULL) n->cfSubringGcd=n->cfGcd; 440 442 if (n->cfIsUnit==NULL) 443 { 444 if (n->is_field) n->cfIsUnit=ndIsUnit_Field; 445 else n->cfIsUnit=ndIsUnit_Ring; 446 } 447 #ifdef HAVE_RING 448 if (n->cfGetUnit==NULL) 449 { 450 if (n->is_field) n->cfGetUnit=n->cfCopy; 451 else n->cfGetUnit=ndGetUnit_Ring; 452 } 453 #endif 441 454 442 455 if(n->cfWriteShort==NULL)
Note: See TracChangeset
for help on using the changeset viewer.