Changeset 6f9aca in git


Ignore:
Timestamp:
Apr 3, 2018, 4:19:37 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
3f6a92be691e6acb53f744e17d66ee5d635802fd
Parents:
f67afed8d454f54035cff586aa3cf35a06a7280e
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2018-04-03 16:19:37+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2018-04-03 16:20:24+02:00
Message:
fix: npInpMult (for 0)
Location:
libpolys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/modulop.cc

    rf67afe r6f9aca  
    9797}
    9898
     99void npInpMult (number &a,number b, const coeffs r)
     100{
     101  n_Test(a, r);
     102  n_Test(b, r);
     103
     104  if (((long)a == 0) || ((long)b == 0))
     105    a=(number)0;
     106  a = npMultM(a,b, r);
     107  n_Test(a, r);
     108}
     109
    99110/*2
    100111* create a number from int
     
    472483
    473484  r->cfMult  = npMult;
    474   r->cfInpMult  = npInpMultM;
     485  r->cfInpMult  = npInpMult;
    475486  r->cfSub   = npSubM;
    476487  r->cfAdd   = npAddM;
     
    518529#endif
    519530
    520 #ifdef NV_OPS
    521   if (c>NV_MAX_PRIME)
    522   {
    523     r->cfMult  = nvMult;
    524     r->cfDiv   = nvDiv;
    525     r->cfExactDiv= nvDiv;
    526     r->cfInvers= nvInvers;
    527     //r->cfPower= nvPower;
    528     if (c>FACTORY_MAX_PRIME)
    529     {
    530       r->convSingNFactoryN=ndConvSingNFactoryN;
    531     }
    532   }
    533 #endif
    534 
    535531  // io via ssi
    536532  r->cfWriteFd=npWriteFd;
  • libpolys/polys/templates/p_Numbers.h

    rf67afe r6f9aca  
    5555#define n_Neg_RingGeneral(n, r)            n_Neg_FieldGeneral(n, r)
    5656#define n_Sub_RingGeneral(n1, n2, r)       n_Sub_FieldGeneral(n1, n2, r)
    57 //#define n_InpMult_RingGeneral(n1, n2, r)   n_InpMult_FieldGeneral(n1, n2, r)
    5857#define n_InpMult_RingGeneral(n1, n2, r)   n_InpMult_FieldGeneral(n1, n2, r)
    5958
     
    104103
    105104static FORCE_INLINE void n_InpMult_FieldZp(number &n1, number n2, const coeffs r)
    106 { STATISTIC(n_InpMult); n1=npMultM(n1, n2, r);  }
     105{ STATISTIC(n_InpMult); npInpMultM(n1, n2, r);  }
    107106
    108107#ifdef HAVE_NUMSTATS
Note: See TracChangeset for help on using the changeset viewer.