Changeset dad9fb in git for libpolys/polys
- Timestamp:
- Mar 15, 2012, 5:26:46 PM (12 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 8066cd9340c30bf555310cdb3ca4a9c82b4f3e92a82c308b8fbf35f5d32c156ead224188e2610f7e
- Parents:
- 788fdfc919bcf38d8b469a0f59374abf9046985dd841a16156c2e0b2a5e731384a7a5e454dffe2d8
- Location:
- libpolys/polys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/ext_fields/transext.cc
r788fdf rdad9fb 247 247 if (IS0(a)) return NULL; 248 248 fraction f = (fraction)a; 249 poly g = p_Copy(NUM(f), ntRing);250 249 fraction result = (fraction)omAlloc0Bin(fractionObjectBin); 251 NUM(result) = g; 252 DEN(result) = NULL; 253 COM(result) = 0; 250 BOOLEAN denis1= DENIS1 (f); 251 if (getCoeffType (ntCoeffs) == n_Q && !denis1) 252 handleNestedFractionsOverQ (f, cf); 253 NUM (result)= p_Copy (NUM (f), ntRing); 254 DEN (result) = NULL; 255 COM (result) = 0; 256 if (getCoeffType (ntCoeffs) == n_Q && denis1) 257 { 258 if (!p_IsConstant (NUM (result), ntRing) && pNext (NUM(result)) != NULL) 259 p_Cleardenom (NUM(result), ntRing); 260 else 261 { 262 number g= p_GetAllDenom (NUM (result), ntRing); 263 NUM (result)= p_Mult_nn (NUM (result), g, ntRing); 264 } 265 } 254 266 return (number)result; 255 267 } … … 260 272 definiteGcdCancellation(a, cf, FALSE); 261 273 fraction f = (fraction)a; 262 poly g;263 if (IS0(f) || DENIS1(f)) g = p_One(ntRing);264 else g = p_Copy(DEN(f), ntRing);265 274 fraction result = (fraction)omAlloc0Bin(fractionObjectBin); 266 NUM(result) = g; 267 DEN(result) = NULL; 268 COM(result) = 0; 275 number g; 276 if (IS0(f) || (DENIS1 (f) && getCoeffType (ntCoeffs) != n_Q)) 277 { 278 NUM (result)= p_One(ntRing); 279 DEN (result)= NULL; 280 COM (result)= 0; 281 } 282 else if (DENIS1 (f)) 283 { 284 poly num= p_Copy (NUM (f), ntRing); 285 if (!p_IsConstant (num, ntRing) && pNext(num) != NULL) 286 p_Cleardenom_n (num, ntRing, g); 287 else 288 g= p_GetAllDenom (num, ntRing); 289 result= (fraction) ntSetMap (ntRing->cf, cf) (g, ntRing->cf, cf); 290 } 291 else 292 { 293 if (getCoeffType (ntCoeffs) == n_Q) 294 handleNestedFractionsOverQ (f, cf); 295 NUM (result)= p_Copy (DEN (f), ntRing); 296 DEN (result) = NULL; 297 COM (result) = 0; 298 } 269 299 return (number)result; 270 300 } … … 1049 1079 if (n_IsZero(a, src)) return NULL; 1050 1080 assume(src == dst->extRing->cf); 1051 poly p = p_ One(dst->extRing);1081 poly p = p_Init(dst->extRing); 1052 1082 number na=n_Copy(a, src); 1053 1083 n_Normalize(na, src); 1054 p_SetCoeff (p, na, dst->extRing);1084 p_SetCoeff0(p, na, dst->extRing); 1055 1085 fraction f = (fraction)omAlloc0Bin(fractionObjectBin); 1056 1086 NUM(f) = p; DEN(f) = NULL; COM(f) = 0; -
libpolys/polys/monomials/p_polys.cc
r788fdf rdad9fb 3414 3414 return NULL; 3415 3415 3416 if( !DENIS1(z) )3417 WarnS("Not implemented yet: Cannot permute a rational fraction and make a polynomial out of it! Ignorring the denumerator.");3416 //if( !DENIS1(z) ) 3417 //WarnS("Not implemented yet: Cannot permute a rational fraction and make a polynomial out of it! Ignorring the denumerator."); 3418 3418 } else 3419 3419 { -
libpolys/polys/monomials/p_polys.h
rd841a1 rdad9fb 437 437 switch(r->typ[i].ord_typ) 438 438 { 439 case ro_am: 439 440 case ro_wp_neg: 440 441 return (((long)((p)->exp[r->pOrdIndex]))-POLY_NEGWEIGHT_OFFSET); -
libpolys/polys/monomials/ring.cc
r788fdf rdad9fb 795 795 r1->cf->ref++; 796 796 } 797 else if ((getCoeffType (r2->cf)==n_algExt || getCoeffType (r2->cf)==n_transExt) && rChar(r2) == rChar(r1)) 798 { 799 /*AlgExtInfo extParam; 800 extParam.r = r2->cf->extRing; 801 extParam.i = r2->cf->extRing->minideal;*/ 802 tmpR.cf=r2->cf; 803 r2->cf->ref++; 804 } 797 805 else 798 806 { … … 809 817 { 810 818 if (getCoeffType(r2->cf)==n_Zp) 819 { 820 tmpR.cf=r2->cf; 821 r2->cf->ref++; 822 } 823 else if (getCoeffType(r2->cf)==n_algExt || getCoeffType(r2->cf)==n_transExt) 811 824 { 812 825 tmpR.cf=r2->cf;
Note: See TracChangeset
for help on using the changeset viewer.