Changeset fd80670 in git


Ignore:
Timestamp:
Nov 29, 2012, 4:39:48 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
fe969a75147c2bf74dfb88f8b9b8ee94e2557a20
Parents:
c49e6ff67dcc4fd9d834166f973fd81fbc6cec2b
git-author:
Martin Lee <martinlee84@web.de>2012-11-29 16:39:48+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-11-30 17:25:33+01:00
Message:
fix: bug in divrem2 and logDeriv
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivarUtil.cc

    rc49e6f rfd80670  
    504504    CanonicalForm G3= div (G, xToOldL);
    505505    CanonicalForm Up= mulMod2 (G3, oldQ, xToLOldL);
    506     CanonicalForm xToOldL2= power (x, oldL/2);
     506    CanonicalForm xToOldL2= power (x, (oldL+1)/2);
    507507    CanonicalForm G2= mod (G, xToOldL);
    508508    CanonicalForm G1= div (G2, xToOldL2);
     
    510510    CanonicalForm oldQ1= div (oldQ, xToOldL2);
    511511    CanonicalForm oldQ0= mod (oldQ, xToOldL2);
    512     CanonicalForm Mid= mulMod2 (G1, oldQ1, xToLOldL);
     512    CanonicalForm Mid;
     513    if (oldL % 2 == 1)
     514      Mid= mulMod2 (G1, oldQ1*x, xToLOldL);
     515    else
     516      Mid= mulMod2 (G1, oldQ1, xToLOldL);
    513517    //computation of Low might be faster using a real middle product?
    514518    CanonicalForm Low= mulMod2 (G0, oldQ1, xToOldL)+mulMod2 (G1, oldQ0, xToOldL);
    515     Low= div (Low, xToOldL2);
     519    Low= div (Low, power (x, oldL/2));
     520    Low= mod (Low, xToLOldL);
    516521    Up += Mid + Low;
    517522    bufF= div (F, xToOldL);
  • factory/facMul.cc

    rc49e6f rfd80670  
    27492749    return;
    27502750  }
    2751   if (!(B.level() == 1 && B.isUnivariate()) &&
    2752       (A.level() == 1 && A.isUnivariate()))
    2753   {
    2754     Q= 0;
    2755     R= A;
    2756     return;
    2757   }
    27582751
    27592752  Variable x= Variable (1);
Note: See TracChangeset for help on using the changeset viewer.