Changeset 6105f4f in git
- Timestamp:
- Jun 5, 2015, 11:32:30 AM (8 years ago)
- Branches:
- (u'spielwiese', 'a7324b6e0b44a1a8ed3fa4d9ca3e2ff210ddd52c')
- Children:
- 237216757140038ef41b344e53b79feabb7002c4
- Parents:
- ab23dcda702726a207b05ce2427acc7936ba4cd0
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/maps_ip.cc
rab23dc r6105f4f 264 264 265 265 number d = n_GetDenom(p_GetCoeff(p, currRing), currRing); 266 p_Test((poly)NUM( d), R);266 p_Test((poly)NUM((fraction)d), R); 267 267 268 268 if ( n_IsOne (d, currRing->cf) ) … … 270 270 n_Delete(&d, currRing); d = NULL; 271 271 } 272 else if (!p_IsConstant((poly)NUM(d), R))272 else if (!p_IsConstant((poly)NUM((fraction)d), R)) 273 273 { 274 274 WarnS("ignoring denominators of coefficients..."); … … 279 279 memset(&tmpW,0,sizeof(sleftv)); 280 280 tmpW.rtyp = POLY_CMD; 281 p_Test((poly)NUM( num), R);282 283 tmpW.data = NUM ( num); // a copy of this poly will be used284 285 p_Normalize(NUM( num),R);281 p_Test((poly)NUM((fraction)num), R); 282 283 tmpW.data = NUM ((fraction)num); // a copy of this poly will be used 284 285 p_Normalize(NUM((fraction)num),R); 286 286 if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,R,NULL,NULL,0,nMap)) 287 287 { -
libpolys/polys/clapconv.cc
rab23dc r6105f4f 297 297 298 298 // test if denominator is constant 299 if (!p_IsConstantPoly(DEN ( p_GetCoeff (p,r)),r->cf->extRing) && !errorreported)299 if (!p_IsConstantPoly(DEN ((fraction)p_GetCoeff (p,r)),r->cf->extRing) && !errorreported) 300 300 WerrorS("conversion error: denominator!= 1"); 301 301 302 CanonicalForm term=convSingPFactoryP(NUM ( p_GetCoeff(p, r)),r->cf->extRing);302 CanonicalForm term=convSingPFactoryP(NUM ((fraction)p_GetCoeff(p, r)),r->cf->extRing); 303 303 304 304 // if denominator is not NULL it should be a constant at this point 305 if (DEN ( p_GetCoeff(p,r)) != NULL)306 { 307 CanonicalForm den= convSingPFactoryP(DEN ( p_GetCoeff(p, r)),r->cf->extRing);305 if (DEN ((fraction)p_GetCoeff(p,r)) != NULL) 306 { 307 CanonicalForm den= convSingPFactoryP(DEN ((fraction)p_GetCoeff(p, r)),r->cf->extRing); 308 308 if (rChar (r) == 0) 309 309 On (SW_RATIONAL); -
libpolys/polys/ext_fields/transext.cc
rab23dc r6105f4f 1455 1455 //PrintS(" den=");p_wrp(DEN(a),ntRing);PrintLn(); 1456 1456 definiteGcdCancellation(a, cf, FALSE); 1457 if ((DEN(a)!=NULL) 1458 &&(!n_GreaterZero(pGetCoeff(DEN(a)),ntCoeffs))) 1459 { 1460 NUM(a)=p_Neg(NUM(a),ntRing); 1461 DEN(a)=p_Neg(DEN(a),ntRing); 1457 fraction f=(fraction)a; 1458 if ((DEN(f)!=NULL) 1459 &&(!n_GreaterZero(pGetCoeff(DEN(f)),ntCoeffs))) 1460 { 1461 NUM(f)=p_Neg(NUM(f),ntRing); 1462 DEN(f)=p_Neg(DEN(f),ntRing); 1463 a=(number)f; 1462 1464 } 1463 1465 } … … 2320 2322 } 2321 2323 2322 NUM( c) = p_Mult_nn(NUM(c), d, R);2324 NUM((fraction)c) = p_Mult_nn(NUM((fraction)c), d, R); 2323 2325 n_Delete(&d, Q); 2324 2326 } -
libpolys/polys/ext_fields/transext.h
rab23dc r6105f4f 73 73 74 74 75 #define NUM(f) (( (fraction)f)->numerator)76 #define DEN(f) (( (fraction)f)->denominator)75 #define NUM(f) ((f)->numerator) 76 #define DEN(f) ((f)->denominator) 77 77 78 78 /* some useful accessors for fractions: */ -
libpolys/polys/monomials/p_polys.cc
rab23dc r6105f4f 3841 3841 assume( !IS0(z) ); 3842 3842 3843 zz = NUM( z);3843 zz = NUM((fraction)z); 3844 3844 p_Test (zz, srcExtRing); 3845 3845 3846 3846 if( zz == NULL ) return NULL; 3847 if( !DENIS1( z) )3848 { 3849 if (p_IsConstant(DEN( z),srcExtRing))3850 { 3851 number n=pGetCoeff(DEN( z));3847 if( !DENIS1((fraction)z) ) 3848 { 3849 if (p_IsConstant(DEN((fraction)z),srcExtRing)) 3850 { 3851 number n=pGetCoeff(DEN((fraction)z)); 3852 3852 zz=p_Div_nn(zz,n,srcExtRing); 3853 3853 p_Normalize(zz,srcExtRing); … … 4011 4011 pcn = (poly) c; 4012 4012 else // nCoeff_is_transExt(C) 4013 pcn = NUM( c);4013 pcn = NUM((fraction)c); 4014 4014 4015 4015 if (pNext(pcn) == NULL) // c->z
Note: See TracChangeset
for help on using the changeset viewer.