Changeset d1f231 in git
 Timestamp:
 Oct 16, 2009, 12:35:00 PM (14 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 e9806890fa4b234b8c11d976584cab53f617eb21
 Parents:
 aaf310683d51b31671eaa0c71091bd597e94f3a5
 Location:
 kernel
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

kernel/clapsing.cc
raaf310 rd1f231 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1.4 5 20090916 12:26:26Singular Exp $5 // $Id: clapsing.cc,v 1.46 20091016 10:35:00 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 87 87 CanonicalForm F( convSingAPFactoryAP( f,a,r ) ), 88 88 G( convSingAPFactoryAP( g,a,r ) ); 89 res= convFactoryAPSingAP( gcd( F, G ) );89 res= convFactoryAPSingAP( gcd( F, G ),currRing ); 90 90 if (!b) Off(SW_USE_QGCD); 91 91 } … … 181 181 CanonicalForm F( convSingAPFactoryAP( f,a,currRing ) ), 182 182 G( convSingAPFactoryAP( g,a,currRing ) ); 183 res= convFactoryAPSingAP( resultant( F, G, X ) );183 res= convFactoryAPSingAP( resultant( F, G, X ),currRing ); 184 184 } 185 185 else … … 329 329 return TRUE; 330 330 } 331 res= convFactoryAPSingAP( extgcd( F, G, Fa, Gb ) );332 pa=convFactoryAPSingAP(Fa );333 pb=convFactoryAPSingAP(Gb );331 res= convFactoryAPSingAP( extgcd( F, G, Fa, Gb ),currRing ); 332 pa=convFactoryAPSingAP(Fa,currRing); 333 pb=convFactoryAPSingAP(Gb,currRing); 334 334 } 335 335 else … … 406 406 return TRUE; 407 407 } 408 res= convFactoryAPSingAP( extgcd( F, G, Fa, Gb ) );409 pa=convFactoryAPSingAP(Fa );410 pb=convFactoryAPSingAP(Gb );408 res= convFactoryAPSingAP( extgcd( F, G, Fa, Gb ),currRing ); 409 pa=convFactoryAPSingAP(Fa,currRing); 410 pb=convFactoryAPSingAP(Gb,currRing); 411 411 } 412 412 else … … 456 456 CanonicalForm F( convSingAPFactoryAP( f,a,currRing ) ), 457 457 G( convSingAPFactoryAP( g,a,currRing ) ); 458 res= convFactoryAPSingAP( F / G );458 res= convFactoryAPSingAP( F / G,currRing ); 459 459 } 460 460 else … … 462 462 CanonicalForm F( convSingTrPFactoryP( f ) ), G( convSingTrPFactoryP( g ) ); 463 463 res= convFactoryPSingTrP( F / G ); 464 } 465 } 466 #if 0 // not yet working 467 else if (rField_is_GF()) 468 { 469 //Print("GF(%d^%d)\n",nfCharP,nfMinPoly[0]); 470 setCharacteristic( nfCharP,nfMinPoly[0], currRing>parameter[0][0] ); 471 CanonicalForm F( convSingGFFactoryGF( f ) ), G( convSingGFFactoryGF( g ) ); 472 res = convFactoryGFSingGF( F / G ); 473 } 474 #endif 475 else 476 WerrorS( feNotImplemented ); 477 Off(SW_RATIONAL); 478 return res; 479 } 480 481 poly singclap_pdivide_r ( poly f, poly g, const ring r ) 482 { 483 poly res=NULL; 484 On(SW_RATIONAL); 485 if (rField_is_Zp(r)  rField_is_Q(r)) 486 { 487 setCharacteristic( n_GetChar(r) ); 488 CanonicalForm F( convSingPFactoryP( f,r ) ), G( convSingPFactoryP( g,r ) ); 489 res = convFactoryPSingP( F / G,r ); 490 } 491 else if (rField_is_Extension(r)) 492 { 493 if (rField_is_Q_a(r)) setCharacteristic( 0 ); 494 else setCharacteristic( n_GetChar(r) ); 495 if (r>minpoly!=NULL) 496 { 497 CanonicalForm mipo=convSingPFactoryP(((lnumber)r>minpoly)>z, 498 r>algring); 499 Variable a=rootOf(mipo); 500 CanonicalForm F( convSingAPFactoryAP( f,a,r ) ), 501 G( convSingAPFactoryAP( g,a,r ) ); 502 res= convFactoryAPSingAP( F / G, r ); 503 } 504 else 505 { 506 CanonicalForm F( convSingTrPFactoryP( f,r ) ), G( convSingTrPFactoryP( g,r ) ); 507 res= convFactoryPSingTrP( F / G,r ); 464 508 } 465 509 } … … 640 684 if (currRing>minpoly!=NULL) 641 685 { 642 q= convFactoryAPSingAP( Q );686 q= convFactoryAPSingAP( Q,currRing ); 643 687 } 644 688 else … … 918 962 else 919 963 { 920 if (!count_Factors(res,w,j,ff,convFactoryAPSingAP( J.getItem().factor() )))964 if (!count_Factors(res,w,j,ff,convFactoryAPSingAP( J.getItem().factor(),currRing ))) 921 965 { 922 966 if (w!=NULL) … … 1217 1261 res>m[j]=convFactoryPSingTrP( J.getItem().factor() ); 1218 1262 else 1219 res>m[j]=convFactoryAPSingAP( J.getItem().factor() );1263 res>m[j]=convFactoryAPSingAP( J.getItem().factor(),currRing ); 1220 1264 } 1221 1265 } … … 1494 1538 } 1495 1539 } 1496 res= convFactoryAPSingAP( determinant(M,r) ) ;1540 res= convFactoryAPSingAP( determinant(M,r),currRing ) ; 1497 1541 } 1498 1542 else … … 1552 1596 1553 1597 // calculate lcm 1554 res= convFactoryASingA( (F/GCD)*G );1598 res= convFactoryASingA( (F/GCD)*G,currRing ); 1555 1599 } 1556 1600 else … … 1591 1635 if ((GCD!=1) && (GCD!=0)) 1592 1636 { 1593 ff= convFactoryASingA( F/ GCD );1594 gg= convFactoryASingA( G/ GCD );1637 ff= convFactoryASingA( F/ GCD, currRing ); 1638 gg= convFactoryASingA( G/ GCD, currRing ); 1595 1639 } 1596 1640 } 
kernel/clapsing.h
raaf310 rd1f231 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.h,v 1. 4 20090813 15:17:03Singular Exp $5 // $Id: clapsing.h,v 1.5 20091016 10:35:00 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 29 29 30 30 poly singclap_pdivide ( poly f, poly g ); 31 poly singclap_pdivide_r ( poly f, poly g, const ring r ); 31 32 32 33 void singclap_divide_content ( poly f );
Note: See TracChangeset
for help on using the changeset viewer.