| 103 | } |
| 104 | |
| 105 | static inline npy_int64 |
| 106 | lcm(npy_int64 x, npy_int64 y) { |
| 107 | npy_int64 lcm; |
| 108 | if (!x || !y) { |
| 109 | return 0; |
| 110 | } |
| 111 | x /= gcd(x,y); |
| 112 | lcm = x*y; |
| 113 | if (lcm/y!=x) { |
| 114 | set_overflow(); |
| 115 | } |
| 116 | return safe_abs64(lcm); |
| 117 | } |
| 118 | |
| 119 | /* Fixed precision rational numbers */ |
| 120 |
no test coverage detected