From e29692d24c45d01c5335754d0a4771465c7f3bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 2 Nov 2024 16:34:44 -0300 Subject: [PATCH] Don't (mis)use `prec_words_to_bits()` We need to remove this function from cypari2, because pari 2.17 has changed precision from words to bits which would cause confusion. Besides, the current usage is incorrect, since `log_pari.precision()` will give the precision in *decimal digits* not in words. --- src/sage/schemes/elliptic_curves/ell_point.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py index d9b7189552e..8345cd08231 100755 --- a/src/sage/schemes/elliptic_curves/ell_point.py +++ b/src/sage/schemes/elliptic_curves/ell_point.py @@ -142,7 +142,6 @@ try: from sage.libs.pari.all import pari, PariError - from cypari2.pari_instance import prec_words_to_bits except ImportError: PariError = () @@ -3712,7 +3711,7 @@ def elliptic_logarithm(self, embedding=None, precision=100, E_pari = E_work.pari_curve() log_pari = E_pari.ellpointtoz(pt_pari, precision=working_prec) - while prec_words_to_bits(log_pari.precision()) < precision: + while log_pari.bitprecision() < precision: # result is not precise enough, re-compute with double # precision. if the base field is not QQ, this # requires modifying the precision of the embedding,