Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
use PARI's ellwp() by default (it's faster than the "fast" implementa…
Browse files Browse the repository at this point in the history
…tion)
  • Loading branch information
yyyyx4 committed Jan 31, 2022
1 parent 439907f commit bf799ad
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/sage/schemes/elliptic_curves/ell_wp.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,9 @@ def weierstrass_p(E, prec=20, algorithm=None):

# if the algorithm is not set, try to determine algorithm from input
if algorithm is None:
if p == 0 or p > prec + 4:
algorithm = "fast"
elif p > prec + 2:
algorithm = "pari"
else:
if 0 < p <= prec + 2:
raise NotImplementedError("currently no algorithms for computing the Weierstrass p-function for that characteristic / precision pair is implemented. Lower the precision below char(k) - 2")
algorithm = "pari"

if algorithm == "pari":
if 0 < p <= prec + 2:
Expand Down

0 comments on commit bf799ad

Please sign in to comment.