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

Function to_128

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

Long integer init */

Source from the content-addressed store, hash-verified

59
60/* Long integer init */
61static inline npy_extint128_t
62to_128(npy_int64 x)
63{
64 npy_extint128_t result;
65 result.sign = (x >= 0 ? 1 : -1);
66 if (x >= 0) {
67 result.lo = x;
68 }
69 else {
70 result.lo = (npy_uint64)(-(x + 1)) + 1;
71 }
72 result.hi = 0;
73 return result;
74}
75
76
77static inline npy_int64

Callers 4

diophantine_dfsFunction · 0.85
mul_64_64Function · 0.85
floordiv_128_64Function · 0.85
ceildiv_128_64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected