Ignore:
Timestamp:
Feb 25, 2013, 3:35:27 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
1c94e44b6b2645f28d5bc81b7b3facc71b2b582d
Parents:
27c79fcbc083eb57ec1345d22a6892cf162f017b
Message:
fix: better tests and normalization for subst
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/transext.cc

    r27c79f r9d68fd  
    278278{
    279279  ntTest(a);
     280  if (IS0(a)) return NULL;
     281
    280282  definiteGcdCancellation(a, cf, FALSE);
    281 
    282   if (IS0(a)) return NULL;
    283283
    284284  fraction f = (fraction)a;
     
    14881488  assume(src == dst->extRing->cf);
    14891489  if ((SR_HDL(a) & SR_INT) || (a->s==3))
    1490     return ntInit(p_NSet(n_Copy(a, src), dst->extRing), dst);
     1490  {
     1491    number res=ntInit(p_NSet(n_Copy(a, src), dst->extRing), dst);
     1492    n_Test(res,dst);
     1493    return res;
     1494  }
    14911495  number nn=nlGetDenom(a,src);
    14921496  number zz=nlGetNumerator(a,src);
    14931497  number res=ntInit(p_NSet(zz,dst->extRing), dst);
    14941498  fraction ff=(fraction)res;
    1495   DEN(ff)=p_NSet(nn,dst->extRing);
     1499  if (n_IsOne(nn,src)) DEN(ff)=NULL;
     1500  else                 DEN(ff)=p_NSet(nn,dst->extRing);
     1501  n_Test((number)ff,dst);
    14961502  return (number)ff;
    14971503}
     
    17461752
    17471753  poly p = p_One(R); p_SetExp(p, iParameter, 1, R); p_Setm(p, R);
    1748 
    1749 //  return (number) p;
     1754  p_Test(p,R);
    17501755
    17511756  fraction f = (fraction)omAlloc0Bin(fractionObjectBin);
Note: See TracChangeset for help on using the changeset viewer.