Changeset f7e9c6 in git


Ignore:
Timestamp:
Sep 4, 2012, 11:56:31 AM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
3c0e63dd166900fac42be3a4607e06a7ed73c36c
Parents:
95a3f28050cbaee31788c2dcfcb842febfbfc9af
git-author:
Martin Lee <martinlee84@web.de>2012-09-04 11:56:31+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-05 15:00:02+02:00
Message:
chg: avoid divisions
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/facFactorize.cc

    r95a3f2 rf7e9c6  
    918918  Aeval= evaluateAtEval (A, evaluation, 2);
    919919
    920   CanonicalForm hh= Lc (Aeval.getFirst());
     920  CanonicalForm hh= 1/Lc (Aeval.getFirst());
    921921
    922922  for (iter= Aeval; iter.hasItem(); iter++)
    923     iter.getItem() /= hh;
    924 
    925   A /= hh;
     923    iter.getItem() *= hh;
     924
     925  A *= hh;
    926926
    927927  CFListIterator iter2;
     
    10231023          Aeval= evaluateAtEval (A, evaluation, 2);
    10241024
    1025           hh= Lc (Aeval.getFirst());
     1025          hh= 1/Lc (Aeval.getFirst());
    10261026
    10271027          for (iter2= Aeval; iter2.hasItem(); iter2++)
    1028             iter2.getItem() /= hh;
    1029 
    1030           A /= hh;
     1028            iter2.getItem() *= hh;
     1029
     1030          A *= hh;
    10311031          break;
    10321032        }
     
    12791279        Aeval= evaluateAtEval (A, evaluation, 2);
    12801280
    1281         hh= Lc (Aeval.getFirst());
     1281        hh= 1/Lc (Aeval.getFirst());
    12821282
    12831283        for (CFListIterator i= Aeval; i.hasItem(); i++)
    1284           i.getItem() /= hh;
    1285 
    1286         A /= hh;
     1284          i.getItem() *= hh;
     1285
     1286        A *= hh;
    12871287      }
    12881288      factors= CFList();
     
    14331433    Aeval= evaluateAtEval (A, evaluation, 2);
    14341434
    1435     hh= Lc (Aeval.getFirst());
     1435    hh= 1/Lc (Aeval.getFirst());
    14361436
    14371437    for (CFListIterator i= Aeval; i.hasItem(); i++)
    1438       i.getItem() /= hh;
    1439 
    1440     A /= hh;
     1438      i.getItem() *= hh;
     1439
     1440    A *= hh;
    14411441
    14421442    if (!fdivides (LC (oldA,1),prod (leadingCoeffs2[lengthAeval2-1])))
  • factory/facFqFactorize.cc

    r95a3f2 rf7e9c6  
    26052605
    26062606  Aeval= evaluateAtEval (A, evaluation, 2);
    2607   CanonicalForm hh= Lc (Aeval.getFirst());
     2607  CanonicalForm hh= 1/Lc (Aeval.getFirst());
    26082608  for (iter= Aeval; iter.hasItem(); iter++)
    2609     iter.getItem() /= hh;
    2610 
    2611   A /= hh;
     2609    iter.getItem() *= hh;
     2610
     2611  A *= hh;
     2612
    26122613
    26132614  CFListIterator iter2;
     
    27142715          Aeval= evaluateAtEval (A, evaluation, 2);
    27152716
    2716           hh= Lc (Aeval.getFirst());
     2717          hh= 1/Lc (Aeval.getFirst());
    27172718
    27182719          for (iter2= Aeval; iter2.hasItem(); iter2++)
    2719             iter2.getItem() /= hh;
    2720 
    2721           A /= hh;
     2720            iter2.getItem() *= hh;
     2721
     2722          A *= hh;
    27222723          break;
    27232724        }
     
    29712972        Aeval= evaluateAtEval (A, evaluation, 2);
    29722973
    2973         hh= Lc (Aeval.getFirst());
     2974        hh= 1/Lc (Aeval.getFirst());
    29742975
    29752976        for (CFListIterator i= Aeval; i.hasItem(); i++)
    2976           i.getItem() /= hh;
    2977 
    2978         A /= hh;
     2977          i.getItem() *= hh;
     2978
     2979        A *= hh;
    29792980      }
    29802981      factors= CFList();
     
    31263127    Aeval= evaluateAtEval (A, evaluation, 2);
    31273128
    3128     hh= Lc (Aeval.getFirst());
     3129    hh= 1/Lc (Aeval.getFirst());
    31293130
    31303131    for (CFListIterator i= Aeval; i.hasItem(); i++)
    3131       i.getItem() /= hh;
    3132 
    3133     A /= hh;
     3132      i.getItem() *= hh;
     3133
     3134    A *= hh;
    31343135
    31353136    if (!fdivides (LC (oldA,1),prod (leadingCoeffs2[lengthAeval2-1])))
Note: See TracChangeset for help on using the changeset viewer.