| 75 | |
| 76 | |
| 77 | static inline npy_int64 |
| 78 | to_64(npy_extint128_t x, char *overflow) |
| 79 | { |
| 80 | if (x.hi != 0 || |
| 81 | (x.sign > 0 && x.lo > NPY_MAX_INT64) || |
| 82 | (x.sign < 0 && x.lo != 0 && x.lo - 1 > -(NPY_MIN_INT64 + 1))) { |
| 83 | *overflow = 1; |
| 84 | } |
| 85 | return x.lo * x.sign; |
| 86 | } |
| 87 | |
| 88 | |
| 89 | /* Long integer multiply */ |