Changeset 168269 in git


Ignore:
Timestamp:
Sep 4, 2012, 3:09:31 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '2234726c50d679d6664181a5c72f75a6fd64a787')
Children:
d1ea8625c243a016689217e069049160140b669b
Parents:
3c0e63dd166900fac42be3a4607e06a7ed73c36c
git-author:
Martin Lee <martinlee84@web.de>2012-09-04 15:09:31+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-05 15:00:02+02:00
Message:
chg: more replacement of divisions by multiplications
Location:
factory
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • factory/algext.cc

    r3c0e63d r168269  
    644644    if(G.inCoeffDomain())
    645645      return CanonicalForm(1);
    646     return G/Lc(G); // return monic G
     646    CanonicalForm lcinv= 1/Lc (G);
     647    return G*lcinv; // return monic G
    647648  }
    648649  if(G.isZero()) // F is non-zero
     
    650651    if(F.inCoeffDomain())
    651652      return CanonicalForm(1);
    652     return F/Lc(F); // return monic F
     653    CanonicalForm lcinv= 1/Lc (F);
     654    return F*lcinv; // return monic F
    653655  }
    654656  if(F.inCoeffDomain() || G.inCoeffDomain())
  • factory/facAlgExt.cc

    r3c0e63d r168269  
    154154  CFListIterator j;
    155155
     156  CanonicalForm lcinv;
    156157  for (CFFListIterator i= sqrf; i.hasItem(); i++)
    157158  {
     
    159160    factorsSqrf= AlgExtSqrfFactorize (i.getItem().factor(), alpha);
    160161    for (j= factorsSqrf; j.hasItem(); j++)
    161       factors.append (CFFactor (j.getItem()/Lc (j.getItem()), i.getItem().exp()));
     162    {
     163      lcinv= 1/Lc (j.getItem());
     164      factors.append (CFFactor (j.getItem()*lcinv, i.getItem().exp()));
     165    }
    162166  }
    163167
  • factory/facFqBivarUtil.cc

    r3c0e63d r168269  
    269269void normalize (CFList& factors)
    270270{
     271  CanonicalForm lcinv;
    271272  for (CFListIterator i= factors; i.hasItem(); i++)
    272     i.getItem() /= Lc(i.getItem());
     273  {
     274    lcinv= 1/Lc (i.getItem());
     275    i.getItem() *= lcinv;
     276  }
    273277  return;
    274278}
     
    276280void normalize (CFFList& factors)
    277281{
     282  CanonicalForm lcinv;
    278283  for (CFFListIterator i= factors; i.hasItem(); i++)
    279     i.getItem()= CFFactor (i.getItem().factor()/Lc(i.getItem().factor()),
     284  {
     285    lcinv= 1/ Lc (i.getItem().factor());
     286    i.getItem()= CFFactor (i.getItem().factor()*lcinv,
    280287                           i.getItem().exp());
     288  }
    281289  return;
    282290}
  • factory/fac_sqrfree.cc

    r3c0e63d r168269  
    160160    CFFList F;
    161161    Variable v = aa.mvar();
     162    CanonicalForm lcinv;
    162163    while ( ! c.degree(v) == 0 )
    163164    {
     
    167168          if (isOn (SW_RATIONAL))
    168169          {
    169             z /= Lc (z);
     170            lcinv= 1/Lc (z);
     171            z *= lcinv;
    170172            z *= bCommonDen (z);
    171173          }
     
    181183      if (isOn (SW_RATIONAL))
    182184      {
    183         w /= Lc (w);
     185        lcinv= 1/Lc (w);
     186        w *= lcinv;
    184187        w *= bCommonDen (w);
    185188      }
Note: See TracChangeset for help on using the changeset viewer.