Changeset 40971d in git for libpolys/coeffs/modulop.h
- Timestamp:
- Nov 22, 2013, 11:58:33 AM (9 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 0615d9680ee7c46dfdc3c107760b2f351a130c31
- Parents:
- fc34c44ed7973f5f200362cfa8f150bc31c8387b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/modulop.h
rfc34c4 r40971d 125 125 r->ch-(long)b+(long)a : (long)a-(long)b); 126 126 } 127 128 static inline number npNegM(number a, const coeffs r)129 {130 return (number)((long)(r->ch)-(long)(a));131 }132 133 127 #else 134 128 static inline number npAddM(number a, number b, const coeffs r) … … 153 147 return (number)res; 154 148 } 149 #endif 155 150 156 157 static inline number npNegM(number b, const coeffs r) 151 static inline number npNegM(number a, const coeffs r) 158 152 { 159 long res = - (long)b; 160 #if SIZEOF_LONG == 8 161 res += (res >> 63) & r->ch; 162 #else 163 res += (res >> 31) & r->ch; 164 #endif 165 return (number)res; 153 return (number)((long)(r->ch)-(long)(a)); 166 154 } 167 168 #endif169 155 170 156 static inline BOOLEAN npIsZeroM (number a, const coeffs)
Note: See TracChangeset
for help on using the changeset viewer.