Changeset c4e9ea in git


Ignore:
Timestamp:
Oct 7, 2013, 9:30:14 PM (9 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
ecf4a6aec8765816e4b84c145f473f1ff6555d71
Parents:
0b4a87ab19d7bd751e10156552aa4184fbff4ea7
git-author:
Martin Lee <martinlee84@web.de>2013-10-07 21:30:14+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-10-08 11:14:43+02:00
Message:
chg: put make monic into p_ProjectiveUnique
File:
1 edited

Legend:

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

    r0b4a87 rc4e9ea  
    22122212        n_Delete(&h,r->cf->extRing->cf);
    22132213      }*/
    2214     }
    2215 
    2216     /* normalize ph over a transcendental extension s.t.
    2217        lead (ph) is > 0 if extRing->cf == Q
    2218        or lead (ph) is monic if extRing->cf == Zp*/
    2219     const coeffs C = r->cf;
    2220     if (nCoeff_is_transExt(C))
    2221     {
    2222       p= ph;
    2223       h= p_GetCoeff (p, C);
    2224       fraction f = (fraction) h;
    2225       poly g = NUM(f);
    2226       number n=p_GetCoeff (g,C->extRing->cf);
    2227       if (rField_is_Q (C->extRing))
    2228       {
    2229         if (!n_GreaterZero(n,C->extRing->cf))
    2230         {
    2231           p=p_Neg (p,r);
    2232         }
    2233       }
    2234       else if (rField_is_Zp(C->extRing))
    2235       {
    2236         if (!n_IsOne (n, C->extRing->cf))
    2237         {
    2238           n=n_Invers (n,C->extRing->cf);
    2239           nMapFunc nMap;
    2240           nMap= n_SetMap (C->extRing->cf, C);
    2241           number ninv= nMap (n,C->extRing->cf, C);
    2242           p=p_Mult_nn (p, ninv, r);
    2243           n_Delete (&ninv, C);
    2244           n_Delete (&n, C->extRing->cf);
    2245         }
    2246       }
    2247       p= ph;
    22482214    }
    22492215  }
     
    29052871
    29062872  p_Cleardenom(ph, r); //performs also a p_Content
     2873 
     2874 
     2875    /* normalize ph over a transcendental extension s.t.
     2876       lead (ph) is > 0 if extRing->cf == Q
     2877       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   
    29072908  return;
    29082909}
Note: See TracChangeset for help on using the changeset viewer.