Skip to content

Commit

Permalink
Don't (mis)use prec_words_to_bits()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tornaria committed Nov 2, 2024
1 parent 1b3f398 commit e29692d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sage/schemes/elliptic_curves/ell_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ()

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e29692d

Please sign in to comment.