()
| 140 | |
| 141 | |
| 142 | def test_diophantine_overflow(): |
| 143 | # Smoke test integer overflow detection |
| 144 | max_intp = np.iinfo(np.intp).max |
| 145 | max_int64 = np.iinfo(np.int64).max |
| 146 | |
| 147 | if max_int64 <= max_intp: |
| 148 | # Check that the algorithm works internally in 128-bit; |
| 149 | # solving this problem requires large intermediate numbers |
| 150 | A = (max_int64//2, max_int64//2 - 10) |
| 151 | U = (max_int64//2, max_int64//2 - 10) |
| 152 | b = 2*(max_int64//2) - 10 |
| 153 | |
| 154 | assert_equal(solve_diophantine(A, U, b), (1, 1)) |
| 155 | |
| 156 | |
| 157 | def check_may_share_memory_exact(a, b): |
nothing calls this directly
no test coverage detected