Skip to content

Commit 5c8186c

Browse files
author
Release Manager
committed
gh-38908: 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. See: #38749 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. URL: #38908 Reported by: Gonzalo Tornaría Reviewer(s): Vincent Delecroix
2 parents 813f2b5 + e29692d commit 5c8186c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sage/schemes/elliptic_curves/ell_point.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142

143143
try:
144144
from sage.libs.pari.all import pari, PariError
145-
from cypari2.pari_instance import prec_words_to_bits
146145
except ImportError:
147146
PariError = ()
148147

@@ -3807,7 +3806,7 @@ def elliptic_logarithm(self, embedding=None, precision=100,
38073806
E_pari = E_work.pari_curve()
38083807
log_pari = E_pari.ellpointtoz(pt_pari, precision=working_prec)
38093808

3810-
while prec_words_to_bits(log_pari.precision()) < precision:
3809+
while log_pari.bitprecision() < precision:
38113810
# result is not precise enough, re-compute with double
38123811
# precision. if the base field is not QQ, this
38133812
# requires modifying the precision of the embedding,

0 commit comments

Comments
 (0)