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

Function floordiv_128_64

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

Divide and round down (positive divisor; no overflows) */

Source from the content-addressed store, hash-verified

285
286/* Divide and round down (positive divisor; no overflows) */
287static inline npy_extint128_t
288floordiv_128_64(npy_extint128_t a, npy_int64 b)
289{
290 npy_extint128_t result;
291 npy_int64 remainder;
292 char overflow = 0;
293 assert(b > 0);
294 result = divmod_128_64(a, b, &remainder);
295 if (a.sign < 0 && remainder != 0) {
296 result = sub_128(result, to_128(1), &overflow);
297 }
298 return result;
299}
300
301
302/* Divide and round up (positive divisor; no overflows) */

Callers 1

diophantine_dfsFunction · 0.85

Calls 3

divmod_128_64Function · 0.85
sub_128Function · 0.85
to_128Function · 0.85

Tested by

no test coverage detected