Ignore:
Timestamp:
Mar 20, 2012, 3:33:34 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
7e9f1298826e9e80c154aaa465935c0ba2acad38
Parents:
dd668fd21e0141dd6716d45d63f34e6ca84d230f
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-20 15:33:34+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-23 16:06:34+01:00
Message:
elimination of rMinpolyIsNULL in favour of nCoeff_is_algExt

fix rMinpolyIsNULL (idIs0)

TODO: remove rMinpolyIsNULL it completely!
File:
1 edited

Legend:

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

    rdd668f rbcfd11a  
    152152      omFreeSize((ADDRESS)monoms,l*sizeof(poly));
    153153    }
    154     if (!rMinpolyIsNULL(dst_r)) result=p_MinPolyNormalize(result, dst_r);
     154
     155    assume(dst_r != NULL);
     156    assume(dst_r->cf != NULL);
     157   
     158    if (nCoeff_is_algExt(dst_r->cf))
     159      result = p_MinPolyNormalize(result, dst_r);
    155160  }
    156161  return result;
     
    318323poly p_MinPolyNormalize(poly p, const ring r)
    319324{
    320   number one = n_Init(1, r->cf);
     325  const coeffs C = r->cf;
     326  number one = n_Init(1, C);
    321327  spolyrec rp;
    322328
     
    326332  {
    327333    // this returns 0, if p == MinPoly
    328     number product = n_Mult(pGetCoeff(p), one,r->cf);
    329     if ((product == NULL)||(n_IsZero(product,r->cf)))
    330     {
    331       p_LmDelete(&p,r);
     334    number product = n_Mult(p_GetCoeff(p, r), one, C);
     335    if ((product == NULL)||(n_IsZero(product, C)))
     336    {
     337      p_LmDelete(&p, r);
    332338    }
    333339    else
    334340    {
    335       p_SetCoeff(p, product,r);
     341      p_SetCoeff(p, product, r);
    336342      pNext(q) = p;
    337343      q = p;
     
    340346  }
    341347  pNext(q) = NULL;
     348  n_Delete(&one, C);
    342349  return rp.next;
    343350}
Note: See TracChangeset for help on using the changeset viewer.