MCPcopy Create free account
hub / github.com/numpy/numpy / gt_128

Function gt_128

numpy/core/src/common/npy_extint128.h:212–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212static inline int
213gt_128(npy_extint128_t a, npy_extint128_t b)
214{
215 if (a.sign > 0 && b.sign > 0) {
216 return (a.hi > b.hi) || (a.hi == b.hi && a.lo > b.lo);
217 }
218 else if (a.sign < 0 && b.sign < 0) {
219 return (a.hi < b.hi) || (a.hi == b.hi && a.lo < b.lo);
220 }
221 else if (a.sign > 0 && b.sign < 0) {
222 return a.hi != 0 || a.lo != 0 || b.hi != 0 || b.lo != 0;
223 }
224 else {
225 return 0;
226 }
227}
228
229
230/* Long integer divide */

Callers 2

diophantine_dfsFunction · 0.85
divmod_128_64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected