Changeset 17887d2 in git


Ignore:
Timestamp:
Oct 8, 2013, 4:23:27 PM (9 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
1ab8c483ab732822980c218349f3ca9cdf2f19b0
Parents:
ecf4a6aec8765816e4b84c145f473f1ff6555d71
Message:
chg: editing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.cc

    recf4a6a r17887d2  
    28762876       lead (ph) is > 0 if extRing->cf == Q
    28772877       or lead (ph) is monic if extRing->cf == Zp*/
    2878     if (nCoeff_is_transExt(C))
    2879     {
    2880       p= ph;
    2881       h= p_GetCoeff (p, C);
    2882       fraction f = (fraction) h;
    2883       poly g = NUM(f);
    2884       number n=p_GetCoeff (g,C->extRing->cf);
    2885       if (rField_is_Q (C->extRing))
    2886       {
    2887         if (!n_GreaterZero(n,C->extRing->cf))
    2888         {
    2889           p=p_Neg (p,r);
    2890         }
    2891       }
    2892       else if (rField_is_Zp(C->extRing))
    2893       {
    2894         if (!n_IsOne (n, C->extRing->cf))
    2895         {
    2896           n=n_Invers (n,C->extRing->cf);
    2897           nMapFunc nMap;
    2898           nMap= n_SetMap (C->extRing->cf, C);
    2899           number ninv= nMap (n,C->extRing->cf, C);
    2900           p=p_Mult_nn (p, ninv, r);
    2901           n_Delete (&ninv, C);
    2902           n_Delete (&n, C->extRing->cf);
    2903         }
    2904       }
    2905       p= ph;
    2906     }
    2907    
     2878  if (nCoeff_is_transExt(C))
     2879  {
     2880    p= ph;
     2881    h= p_GetCoeff (p, C);
     2882    fraction f = (fraction) h;
     2883    number n=p_GetCoeff (NUM (f),C->extRing->cf);
     2884    if (rField_is_Q (C->extRing))
     2885    {
     2886      if (!n_GreaterZero(n,C->extRing->cf))
     2887      {
     2888        p=p_Neg (p,r);
     2889      }
     2890    }
     2891    else if (rField_is_Zp(C->extRing))
     2892    {
     2893      if (!n_IsOne (n, C->extRing->cf))
     2894      {
     2895        n=n_Invers (n,C->extRing->cf);
     2896        nMapFunc nMap;
     2897        nMap= n_SetMap (C->extRing->cf, C);
     2898        number ninv= nMap (n,C->extRing->cf, C);
     2899        p=p_Mult_nn (p, ninv, r);
     2900        n_Delete (&ninv, C);
     2901        n_Delete (&n, C->extRing->cf);
     2902      }
     2903    }
     2904    p= ph;
     2905  }
     2906
    29082907  return;
    29092908}
Note: See TracChangeset for help on using the changeset viewer.