From 066a19bc36ce7e2f2f3404f3e7b321cee040174f Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 19 May 2021 09:43:21 +0100 Subject: [PATCH] precision error in dual --- estimator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/estimator.py b/estimator.py index 966c6127a..39f246dd6 100644 --- a/estimator.py +++ b/estimator.py @@ -1193,7 +1193,8 @@ def rinse_and_repeat( i = floor(-log(success_probability, 2)) has_solution = False while True: - prob = RR(min(2 ** -i, success_probability)) + # RR() fixes the precision issue, but we still infinite loop via line 1218 + prob = RR(min(2 ** RR(-i), success_probability)) try: current = f(n, alpha, q, success_probability=prob, m=m, *args, **kwds) repeat = amplify(success_probability, prob, majority=decision) @@ -1531,8 +1532,7 @@ class BKZ: 10–24). """ - - return BKZ._BDGL16_asymptotic(beta, d, B) + return BKZ._BDGL16_asymptotic(beta, d, B) @staticmethod def LaaMosPol14(beta, d, B=None):