Changeset 40e88db in git
- Timestamp:
- Jan 6, 2012, 9:34:02 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- e77676b144a632a4f4be31c2b5ece802a9c3c2f5
- Parents:
- 79020f1e7903b16af027b1e0a1240dd1b386a87a
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-01-06 21:34:02+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-01-06 21:59:37+01:00
- Location:
- libpolys/coeffs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/modulop.cc
r79020f r40e88db 28 28 /// Our Type! 29 29 static const n_coeffType ID = n_Zp; 30 31 #ifdef NV_OPS 32 #pragma GCC diagnostic ignored "-Wlong-long" 33 static inline number nvMultM(number a, number b, const coeffs r) 34 { 35 assume( getCoeffType(r) == ID ); 36 37 #if SIZEOF_LONG == 4 38 #define ULONG64 (unsigned long long)(unsigned long) 39 #else 40 #define ULONG64 (unsigned long) 41 #endif 42 return (number) 43 (unsigned long)((ULONG64 a)*(ULONG64 b) % (ULONG64 r->ch)); 44 } 45 number nvMult (number a, number b, const coeffs r); 46 number nvDiv (number a, number b, const coeffs r); 47 number nvInvers (number c, const coeffs r); 48 void nvPower (number a, int i, number * result, const coeffs r); 49 #endif 50 51 52 30 53 31 54 BOOLEAN npGreaterZero (number k, const coeffs r) -
libpolys/coeffs/modulop.h
r79020f r40e88db 168 168 169 169 170 #ifdef NV_OPS171 #pragma GCC diagnostic ignored "-Wlong-long"172 static inline number nvMultM(number a, number b, const coeffs r)173 {174 #if SIZEOF_LONG == 4175 #define ULONG64 (unsigned long long)(unsigned long)176 #else177 #define ULONG64 (unsigned long)178 #endif179 return (number)180 (unsigned long)((ULONG64 a)*(ULONG64 b) % (ULONG64 r->npPrimeM));181 }182 number nvMult (number a, number b, const coeffs r);183 number nvDiv (number a, number b, const coeffs r);184 number nvInvers (number c, const coeffs r);185 void nvPower (number a, int i, number * result, const coeffs r);186 #endif187 170 188 171 #endif
Note: See TracChangeset
for help on using the changeset viewer.