Changeset f55f39 in git


Ignore:
Timestamp:
Jul 31, 2012, 3:31:51 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
97686ecde8614d72ee9d26e96dc9344df8a7da32
Parents:
3ace5b6cacf35176c78dd144d681a504076ac119
git-author:
Martin Lee <martinlee84@web.de>2012-07-31 15:31:51+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-04 17:25:37+02:00
Message:
chg: multiply by common denominator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFactorize.cc

    r3ace5b6 rf55f39  
    658658  }
    659659
     660  A *= bCommonDen (A);
    660661  // check main variable
    661662  CFList Aeval, list, evaluation, bufEvaluation, bufAeval;
     
    946947  bool noOneToOne= false;
    947948
     949  CFList commonDenominators;
     950  for (CFListIterator iter=biFactors; iter.hasItem(); iter++)
     951    commonDenominators.append (bCommonDen (iter.getItem()));
     952  CanonicalForm tmp1, tmp2, tmp3=1;
     953  CFListIterator iter1, iter2;
     954  for (int i= 0; i < A.level() - 2; i++)
     955  {
     956    iter2= commonDenominators;
     957    for (iter1= leadingCoeffs2[i]; iter1.hasItem(); iter1++, iter2++)
     958    {
     959      tmp1= bCommonDen (iter1.getItem());
     960      Off (SW_RATIONAL);
     961      iter2.getItem()= lcm (iter2.getItem(), tmp1);
     962      On (SW_RATIONAL);
     963    }
     964  }
     965  tmp1= prod (commonDenominators);
     966  for (iter1= Aeval; iter1.hasItem(); iter1++)
     967  {
     968    tmp2= bCommonDen (iter1.getItem());
     969    Off (SW_RATIONAL);
     970    tmp3= lcm (tmp2,tmp3);
     971    On (SW_RATIONAL);
     972  }
     973  CanonicalForm multiplier;
     974  multiplier= tmp3/tmp1;
     975  iter2= commonDenominators;
     976  for (iter1=biFactors; iter1.hasItem(); iter1++, iter2++)
     977    iter1.getItem() *= iter2.getItem()*multiplier;
     978
     979  for (iter1= Aeval; iter1.hasItem(); iter1++)
     980    iter1.getItem() *= tmp3*power (multiplier, biFactors.length() - 1);
     981
     982  for (int i= 0; i < A.level() - 2; i++)
     983  {
     984    iter2= commonDenominators;
     985    for (iter1= leadingCoeffs2[i]; iter1.hasItem(); iter1++, iter2++)
     986      iter1.getItem() *= iter2.getItem()*multiplier;
     987  }
     988
     989
    948990  factors= nonMonicHenselLift (Aeval, biFactors, leadingCoeffs2, diophant,
    949991                               Pi, liftBounds, liftBoundsLength, noOneToOne);
Note: See TracChangeset for help on using the changeset viewer.