Changeset 755296 in git
- Timestamp:
- Feb 28, 2020, 2:30:53 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- f3f5266081df80b1fe68e322c350488db24adf59
- Parents:
- b3d4943f507c84f3286a9da17cd0a8e84a5abbc0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/modulop.h
rb3d494 r755296 117 117 { 118 118 unsigned long R = (unsigned long)a + (unsigned long)b; 119 return (number)(R >= r->ch ? R -r->ch : R);119 return (number)(R >= (unsigned long)r->ch ? R - (unsigned long)r->ch : R); 120 120 } 121 121 static inline void npInpAddM(number &a, number b, const coeffs r) 122 122 { 123 123 unsigned long R = (unsigned long)a + (unsigned long)b; 124 a=(number)(R >= r->ch ? R -r->ch : R);124 a=(number)(R >= (unsigned long)r->ch ? R - (unsigned long)r->ch : R); 125 125 } 126 126 static inline number npSubM(number a, number b, const coeffs r) … … 132 132 static inline number npAddM(number a, number b, const coeffs r) 133 133 { 134 unsigned long res = ( long)((unsigned long)a + (unsigned long)b);134 unsigned long res = ((unsigned long)a + (unsigned long)b); 135 135 res -= r->ch; 136 136 #if SIZEOF_LONG == 8 … … 143 143 static inline void npInpAddM(number &a, number b, const coeffs r) 144 144 { 145 unsigned long res = ( long)((unsigned long)a + (unsigned long)b);145 unsigned long res = ((unsigned long)a + (unsigned long)b); 146 146 res -= r->ch; 147 147 #if SIZEOF_LONG == 8 … … 180 180 static inline long npInvMod(long a, const coeffs R) 181 181 { 182 long s , t;183 184 long u, v, u0, v0,u1, u2, q, r;182 long s; 183 184 long u, v, u0, u1, u2, q, r; 185 185 186 186 assume(a>0); … … 255 255 // The folloing is reused inside tgb*.cc 256 256 number npMult (number a, number b, const coeffs r); 257 // The following is currently used in OPAE.cc, OPAEQ.cc and OPAEp.cc for setting their SetMap...258 nMapFunc npSetMap(const coeffs src, const coeffs dst); // FIXME! BUG?259 257 260 258 #define npEqualM(A,B,r) ((A)==(B))
Note: See TracChangeset
for help on using the changeset viewer.