| 84 | } |
| 85 | |
| 86 | static inline npy_int64 |
| 87 | gcd(npy_int64 x, npy_int64 y) { |
| 88 | x = safe_abs64(x); |
| 89 | y = safe_abs64(y); |
| 90 | if (x < y) { |
| 91 | npy_int64 t = x; |
| 92 | x = y; |
| 93 | y = t; |
| 94 | } |
| 95 | while (y) { |
| 96 | npy_int64 t; |
| 97 | x = x%y; |
| 98 | t = x; |
| 99 | x = y; |
| 100 | y = t; |
| 101 | } |
| 102 | return x; |
| 103 | } |
| 104 | |
| 105 | static inline npy_int64 |
| 106 | lcm(npy_int64 x, npy_int64 y) { |
no test coverage detected