Changeset c95632f in git
- Timestamp:
- Jan 27, 2005, 5:41:12 PM (18 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '7725b5cfc1eaf99630826ecc59f559d3b6831c24')
- Children:
- cf5fc11febc65499165e79274d51a6d847e1391b
- Parents:
- a89a11590ebf9f1947d433a1980705a4cff8a5e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/clapsing.cc
ra89a115 rc95632f 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1. 3 2004-12-15 17:45:10Singular Exp $5 // $Id: clapsing.cc,v 1.4 2005-01-27 16:41:12 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 275 275 } 276 276 277 /*2 find the maximal exponent of var(i) in poly p*/ 278 int pGetExp_Var(poly p, int i) 279 { 280 int m=0; 281 int mm; 282 while (p!=NULL) 283 { 284 mm=pGetExp(p,i); 285 if (mm>m) m=mm; 286 pIter(p); 287 } 288 return m; 289 } 290 277 291 poly singclap_resultant ( poly f, poly g , poly x) 278 292 { … … 315 329 { 316 330 Variable X(i+rPar(currRing)); 331 number nf,ng; 332 pCleardenom_n(f,nf);pCleardenom_n(g,ng); 333 int ef,eg; 334 ef=pGetExp_Var(f,i); 335 eg=pGetExp_Var(g,i); 317 336 CanonicalForm F( convSingTrPClapP( f ) ), G( convSingTrPClapP( g ) ); 318 337 res= convClapPSingTrP( resultant( F, G, X ) ); 338 if ((nf!=NULL)&&(!nIsOne(nf))&&(!nIsZero(nf))) 339 { 340 number n=nInvers(nf); 341 while(eg>0) 342 { 343 res=pMult_nn(res,n); 344 eg--; 345 } 346 nDelete(&n); 347 } 348 nDelete(&nf); 349 if ((ng!=NULL)&&(!nIsOne(ng))&&(!nIsZero(ng))) 350 { 351 number n=nInvers(ng); 352 while(ef>0) 353 { 354 res=pMult_nn(res,n); 355 ef--; 356 } 357 nDelete(&n); 358 } 359 nDelete(&ng); 319 360 } 320 361 Off(SW_RATIONAL);
Note: See TracChangeset
for help on using the changeset viewer.