Changeset 4609b7 in git for libpolys/polys


Ignore:
Timestamp:
Oct 7, 2013, 3:56:41 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0b4a87ab19d7bd751e10156552aa4184fbff4ea7
Parents:
9030ce67e86f3969436b1e54affb5d969d7143bc
git-author:
Martin Lee <martinlee84@web.de>2013-10-07 15:56:41+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-10-07 18:15:10+02:00
Message:
chg: extra treatment of transcendental extensions in p_Content
File:
1 edited

Legend:

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

    r9030ce r4609b7  
    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;
    22142248    }
    22152249  }
Note: See TracChangeset for help on using the changeset viewer.