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

Commit

Permalink
trac #9320 remove the algo keyword and the duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Mar 5, 2016
1 parent bd9aa7f commit 28cb70c
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions src/sage/schemes/elliptic_curves/ell_number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,11 +2018,11 @@ def reduction(self,place):
return self.change_ring(Fv)

@cached_method
def root_number(self, P=None, algorithm="pari"):
def root_number(self, P=None):
r"""
Returns the global or local root number of this elliptic curve.
This is 1 if the order of vanishing of the L-function L(E,s) at 1
Return the global or local root number of this elliptic curve.
This is 1 if the order of vanishing of the L-function L(E,s) at 1
is even, and -1 if it is odd.
The computations are based on [Rohr]_, [Koba]_ for primes `P|3`
Expand All @@ -2034,24 +2034,21 @@ def root_number(self, P=None, algorithm="pari"):
root number at this ideal, otherwise return the global root
number
- ``algorithm`` - string (default: "pari") Ignored unless the
base field is `\QQ`. If "pari", use the PARI
C-library ``ellrootno`` implementation over `\QQ`.
If "generic", use the general number field
implementation.
OUTPUT:
The global or local root number of the elliptic curve, either 1 or -1.
Over `\QQ`, the PARI C-library ``ellrootno`` implementation is used.
Otherwise, the general number field implementation is used.
EXAMPLES:
Finding some global root numbers::
sage: EllipticCurve('11a1').root_number()
1
sage: EllipticCurve('37a1').root_number()
-1
-1
sage: EllipticCurve('389a1').root_number()
1
sage: EllipticCurve('208b1').root_number()
Expand All @@ -2073,7 +2070,7 @@ def root_number(self, P=None, algorithm="pari"):
1
The root number is cached::
sage: E.root_number(2) is E.root_number(2)
True
sage: E.root_number()
Expand All @@ -2099,15 +2096,8 @@ def root_number(self, P=None, algorithm="pari"):
.. [Koba] S. Kobayashi "The local root number of elliptic curves with wild ramification"
.. [Dokch] T. and V. Dokchitser "Root numbers and parity ranks of elliptic curves"
"""
if algorithm == "pari" and self.base_field() is QQ:
e = self.pari_mincurve()
if P is None:
return Integer(e.ellrootno())

return Integer(e.ellrootno(P if P in ZZ else P.gen()))

if algorithm == "magma":
raise NotImplementedError('not yet available via magma')
# the case of base field QQ is tackled by ell_rational_field
# here is the generic implementation only

if P is None:
# contribution from places at infinity
Expand Down

0 comments on commit 28cb70c

Please sign in to comment.