Changeset 6105f4f in git


Ignore:
Timestamp:
Jun 5, 2015, 11:32:30 AM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'a7324b6e0b44a1a8ed3fa4d9ca3e2ff210ddd52c')
Children:
237216757140038ef41b344e53b79feabb7002c4
Parents:
ab23dcda702726a207b05ce2427acc7936ba4cd0
Message:
transext.cc: NUM/DEN do not include type cast any more
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/maps_ip.cc

    rab23dc r6105f4f  
    264264
    265265      number d = n_GetDenom(p_GetCoeff(p, currRing), currRing);
    266       p_Test((poly)NUM(d), R);
     266      p_Test((poly)NUM((fraction)d), R);
    267267
    268268      if ( n_IsOne (d, currRing->cf) )
     
    270270        n_Delete(&d, currRing); d = NULL;
    271271      }
    272       else if (!p_IsConstant((poly)NUM(d), R))
     272       else if (!p_IsConstant((poly)NUM((fraction)d), R))
    273273      {
    274274        WarnS("ignoring denominators of coefficients...");
     
    279279      memset(&tmpW,0,sizeof(sleftv));
    280280      tmpW.rtyp = POLY_CMD;
    281       p_Test((poly)NUM(num), R);
    282 
    283       tmpW.data = NUM (num); // a copy of this poly will be used
    284 
    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);
    286286      if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,R,NULL,NULL,0,nMap))
    287287      {
  • libpolys/polys/clapconv.cc

    rab23dc r6105f4f  
    297297
    298298    // 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)
    300300      WerrorS("conversion error: denominator!= 1");
    301301
    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);
    303303
    304304    // 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);
    308308      if (rChar (r) == 0)
    309309        On (SW_RATIONAL);
  • libpolys/polys/ext_fields/transext.cc

    rab23dc r6105f4f  
    14551455    //PrintS(" den=");p_wrp(DEN(a),ntRing);PrintLn();
    14561456    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;
    14621464    }
    14631465  }
     
    23202322    }
    23212323
    2322     NUM(c) = p_Mult_nn(NUM(c), d, R);
     2324    NUM((fraction)c) = p_Mult_nn(NUM((fraction)c), d, R);
    23232325    n_Delete(&d, Q);
    23242326  }
  • libpolys/polys/ext_fields/transext.h

    rab23dc r6105f4f  
    7373
    7474
    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)
    7777
    7878/* some useful accessors for fractions: */
  • libpolys/polys/monomials/p_polys.cc

    rab23dc r6105f4f  
    38413841    assume( !IS0(z) );
    38423842
    3843     zz = NUM(z);
     3843    zz = NUM((fraction)z);
    38443844    p_Test (zz, srcExtRing);
    38453845
    38463846    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));
    38523852        zz=p_Div_nn(zz,n,srcExtRing);
    38533853        p_Normalize(zz,srcExtRing);
     
    40114011                 pcn = (poly) c;
    40124012               else //            nCoeff_is_transExt(C)
    4013                  pcn = NUM(c);
     4013                 pcn = NUM((fraction)c);
    40144014
    40154015              if (pNext(pcn) == NULL) // c->z
Note: See TracChangeset for help on using the changeset viewer.