# HG changeset patch
# User Willem Jan Palenstijn <wpalenst@math.leidenuniv.nl>
# Date 1200675149 -3600
# Node ID 95788c7b9898c84e27966c69c4ce73b2e44b0fd3
# Parent 6f44051873a8dafd1fb829edf30ff3da4b552e38
check for fpLLL return value != 0 from proved LLL variants
diff -r 6f44051873a8 -r 95788c7b9898 sage/libs/fplll/fplll.pyx
a
|
b
|
cdef class FP_LLL: |
183 | 183 | ret = w.LLL() |
184 | 184 | _sig_off |
185 | 185 | wrapper_delete(w) |
186 | | if ret < 0: |
187 | | raise RuntimeError, "fpLLL returned %d < 0"%ret |
| 186 | if ret != 0: |
| 187 | raise RuntimeError, "fpLLL returned %d != 0"%ret |
188 | 188 | |
189 | 189 | |
190 | 190 | def proved(self, int precision=0, float eta=0.51, float delta=0.99, implementation=None): |
… |
… |
cdef class FP_LLL: |
268 | 268 | _sig_off |
269 | 269 | proved_mpfr_delete(pmpfr) |
270 | 270 | |
271 | | if ret < 0: |
272 | | raise RuntimeError, "fpLLL returned %d < 0"%ret |
| 271 | if ret != 0: |
| 272 | raise RuntimeError, "fpLLL returned %d != 0"%ret |
273 | 273 | |
274 | 274 | def fast(self, int precision=0, float eta=0.51, float delta=0.99, implementation=None): |
275 | 275 | """ |
… |
… |
cdef class FP_LLL: |
327 | 327 | ret = pdouble.LLL() |
328 | 328 | _sig_off |
329 | 329 | fast_double_delete(pdouble) |
330 | | |
331 | | if ret < 0: |
332 | | raise RuntimeError, "fpLLL returned %d < 0"%ret |
333 | 330 | |
334 | 331 | def fast_early_red(self, int precision=0, float eta=0.51, float delta=0.99, implementation=None): |
335 | 332 | """ |
… |
… |
cdef class FP_LLL: |
394 | 391 | ret = pdouble.LLL() |
395 | 392 | _sig_off |
396 | 393 | fast_early_red_double_delete(pdouble) |
397 | | |
398 | | if ret < 0: |
399 | | raise RuntimeError, "fpLLL returned %d < 0"%ret |
400 | 394 | |
401 | 395 | def heuristic(self, int precision=0, float eta=0.51, float delta=0.99, implementation=None): |
402 | 396 | """ |
… |
… |
cdef class FP_LLL: |
472 | 466 | ret = pmpfr.LLL() |
473 | 467 | _sig_off |
474 | 468 | heuristic_mpfr_delete(pmpfr) |
475 | | |
476 | | if ret < 0: |
477 | | raise RuntimeError, "fpLLL returned %d < 0"%ret |
478 | | |
479 | 469 | |
480 | 470 | def heuristic_early_red(self, int precision=0, float eta=0.51, float delta=0.99, implementation=None): |
481 | 471 | """ |
… |
… |
cdef class FP_LLL: |
558 | 548 | ret = pmpfr.LLL() |
559 | 549 | _sig_off |
560 | 550 | heuristic_early_red_mpfr_delete(pmpfr) |
561 | | |
562 | | if ret < 0: |
563 | | raise RuntimeError, "fpLLL returned %d < 0"%ret |
564 | 551 | |
565 | 552 | def gen_intrel(int d, int b): |
566 | 553 | """ |