Changeset 98a94b in git
- Timestamp:
- Apr 26, 2018, 4:26:40 PM (5 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- e4c8dc9ef21f56d682d47ce39530ce221c22dd44
- Parents:
- 2ba25ee7ea3c483c73847576db73cb6464bc67ba
- Location:
- libpolys/coeffs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/modulop.cc
r2ba25e r98a94b 164 164 int s = r->npLogTable[(long)a] - r->npLogTable[(long)b]; 165 165 #ifdef HAVE_GENERIC_ADD 166 if (s < 0)167 s += r->npPminus1M;166 if (s < 0) 167 s += r->npPminus1M; 168 168 #else 169 169 #if SIZEOF_LONG == 8 -
libpolys/coeffs/modulop.h
r2ba25e r98a94b 74 74 long x = (long)r->npLogTable[(long)a]+ r->npLogTable[(long)b]; 75 75 #ifdef HAVE_GENERIC_ADD 76 if (x>r->npPminus1M) x-=r->npPminus1M;76 if (x>=r->npPminus1M) x-=r->npPminus1M; 77 77 #else 78 78 x-=r->npPminus1M; 79 79 #if SIZEOF_LONG == 8 80 x += (x >> 63) & r->npPminus1M;80 x += (x >> 63) & r->npPminus1M; 81 81 #else 82 x += (x >> 31) & r->npPminus1M;82 x += (x >> 31) & r->npPminus1M; 83 83 #endif 84 84 #endif … … 89 89 long x = (long)r->npLogTable[(long)a]+ r->npLogTable[(long)b]; 90 90 #ifdef HAVE_GENERIC_ADD 91 if (x>r->npPminus1M) x-=r->npPminus1M;91 if (x>=r->npPminus1M) x-=r->npPminus1M; 92 92 #else 93 93 x-=r->npPminus1M; 94 94 #if SIZEOF_LONG == 8 95 x += (x >> 63) & r->npPminus1M;95 x += (x >> 63) & r->npPminus1M; 96 96 #else 97 x += (x >> 31) & r->npPminus1M;97 x += (x >> 31) & r->npPminus1M; 98 98 #endif 99 99 #endif … … 268 268 long npInt (number &n, const coeffs r); 269 269 270 // The folloing is reused inside tgb*.cc 271 number npMult (number a, number b, const coeffs r); 270 272 // The following is currently used in OPAE.cc, OPAEQ.cc and OPAEp.cc for setting their SetMap... 271 273 nMapFunc npSetMap(const coeffs src, const coeffs dst); // FIXME! BUG?
Note: See TracChangeset
for help on using the changeset viewer.