- Timestamp:
- Jul 11, 2017, 9:59:44 AM (7 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 0ec309ddd6253287d647226c352fff30a3417b99
- Parents:
- 3092f65270fb472dca33d7d41d19f79dbb1cd638
- Location:
- libpolys/polys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/clapsing.cc
r3092f6 r3d5596 575 575 } 576 576 577 poly singclap_pmod ( poly f, poly g, const ring r ) 578 { 579 poly res=NULL; 580 On(SW_RATIONAL); 581 if (rField_is_Zp(r) || rField_is_Q(r)) 582 { 583 setCharacteristic( rChar(r) ); 584 CanonicalForm F( convSingPFactoryP( f,r ) ), G( convSingPFactoryP( g,r ) ); 585 res = convFactoryPSingP( F % G,r ); 586 } 587 else if (rField_is_Ring_Z(r)) 588 { 589 Off(SW_RATIONAL); 590 setCharacteristic( rChar(r) ); 591 CanonicalForm F( convSingPFactoryP( f,r ) ), G( convSingPFactoryP( g,r ) ); 592 res = convFactoryPSingP( F % G,r ); 593 } 594 else if (r->cf->extRing!=NULL) 595 { 596 if (rField_is_Q_a(r)) setCharacteristic( 0 ); 597 else setCharacteristic( rChar(r) ); 598 if (r->cf->extRing->qideal!=NULL) 599 { 600 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 601 r->cf->extRing); 602 Variable a=rootOf(mipo); 603 CanonicalForm F( convSingAPFactoryAP( f,a,r ) ), 604 G( convSingAPFactoryAP( g,a,r ) ); 605 res= convFactoryAPSingAP( F % G, r ); 606 prune (a); 607 } 608 else 609 { 610 CanonicalForm F( convSingTrPFactoryP( f,r ) ), G( convSingTrPFactoryP( g,r ) ); 611 res= convFactoryPSingTrP( F % G,r ); 612 } 613 } 614 #if 0 // not yet working 615 else if (rField_is_GF()) 616 { 617 //Print("GF(%d^%d)\n",nfCharP,nfMinPoly[0]); 618 setCharacteristic( nfCharP,nfMinPoly[0], currRing->parameter[0][0] ); 619 CanonicalForm F( convSingGFFactoryGF( f ) ), G( convSingGFFactoryGF( g ) ); 620 res = convFactoryGFSingGF( F / G ); 621 } 622 #endif 623 else 624 WerrorS( feNotImplemented ); 625 Off(SW_RATIONAL); 626 return res; 627 } 628 577 629 void singclap_divide_content ( poly f, const ring r ) 578 630 { -
libpolys/polys/clapsing.h
r3092f6 r3d5596 39 39 40 40 poly singclap_pdivide ( poly f, poly g, const ring r ); 41 poly singclap_pmod ( poly f, poly g, const ring r ); 41 42 42 43 void singclap_divide_content ( poly f, const ring r);
Note: See TracChangeset
for help on using the changeset viewer.