Changeset fd80670 in git for factory/facFqBivarUtil.cc


Ignore:
Timestamp:
Nov 29, 2012, 4:39:48 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
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
File:
1 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);
Note: See TracChangeset for help on using the changeset viewer.