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

Commit

Permalink
Trac 15767: reviewer patch
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbruin committed Aug 18, 2014
1 parent 37fc8e8 commit 5db54b6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
27 changes: 11 additions & 16 deletions src/sage/libs/pari/gen.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2254,14 +2254,7 @@ cdef class gen(sage.structure.element.RingElement):
precision = P.get_series_precision()
pari_catch_sig_on()
cdef long vn = P.get_var(v)
if isexactzero(f.g):
# Special case for f = 0, because scalarser() is broken
# in PARI 2.5.5, causing e.g. Ser(gen_0) to give O(x^0).
# This is fixed in PARI 2.6.
if vn == -1:
vn = 0 # otherwise the variable will be called '#'
return P.new_gen(zeroser(vn, precision))
elif typ(f.g) == t_VEC:
if typ(f.g) == t_VEC:
# The precision flag is ignored for vectors, so we first
# convert the vector to a polynomial.
return P.new_gen(gtoser(gtopolyrev(f.g, vn), vn, precision))
Expand Down Expand Up @@ -5268,7 +5261,7 @@ cdef class gen(sage.structure.element.RingElement):
def phi(gen n):
"""
Return the Euler phi function of n.
EXAMPLES::
sage: pari(10).phi()
Expand Down Expand Up @@ -5429,10 +5422,10 @@ cdef class gen(sage.structure.element.RingElement):
OUTPUT:
- ``gen`` - a PARI ell structure.
- ``gen`` -- a PARI ell structure.
EXAMPLES:
An elliptic curve with integer coefficients::
sage: e = pari([0,1,0,1,0]).ellinit(); e
Expand Down Expand Up @@ -5474,7 +5467,7 @@ cdef class gen(sage.structure.element.RingElement):
- ``c`` - the product of the local Tamagawa numbers of `e`.
- ``faN`` is the factorization of `N`
- ``L[i]`` is ``elllocalred(E, faN[i,1])``
EXAMPLES::
Expand Down Expand Up @@ -5507,7 +5500,7 @@ cdef class gen(sage.structure.element.RingElement):
OUTPUT: point on E
EXAMPLES:
First we create an elliptic curve::
sage: e = pari([0, 1, 1, -2, 0]).ellinit()
Expand Down Expand Up @@ -6382,7 +6375,9 @@ cdef class gen(sage.structure.element.RingElement):
pari_catch_sig_on()
return P.new_gen(ellsub(self.g, t0.g, t1.g))

def elltaniyama(self, long n=16):
def elltaniyama(self, long n=-1):
if n < 0:
n = P.get_series_precision()
pari_catch_sig_on()
return P.new_gen(elltaniyama(self.g, n))

Expand Down Expand Up @@ -6581,7 +6576,7 @@ cdef class gen(sage.structure.element.RingElement):
REFERENCES:
.. [PariUsers] User's Guide to PARI/GP,
http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.5.1/users.pdf
http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.7.0/users.pdf
"""
pari_catch_sig_on()
n = bnfcertify(self.g)
Expand Down Expand Up @@ -6953,7 +6948,7 @@ cdef class gen(sage.structure.element.RingElement):
- ``fa``: If present, encodes a subset of primes at which to
check for maximality. This must be one of the three following
things:
- an integer: check all primes up to ``fa`` using trial
division.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/fast_arith.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ cpdef prime_range(start, stop=None, algorithm="pari_primes", bint py_ints=False)
[2499923, 2499941, 2499943, 2499947, 2499949, 2499953, 2499967, 2499983, 2499989, 2499997]
A non-trivial range without primes::
sage: prime_range(4652360, 4652400)
[]
Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/elliptic_curves/ell_rational_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def pari_curve(self, prec=None, factor=1):
sage: Ep = EllipticCurve('903b3').pari_curve()
This still works, even When the curve coefficients are large
This still works, even when the curve coefficients are large
(see :trac:`13163`)::
sage: E = EllipticCurve([4382696457564794691603442338788106497, 28, 3992, 16777216, 298])
Expand Down Expand Up @@ -3708,7 +3708,7 @@ def torsion_points(self, algorithm="pari"):
Some curves with large torsion groups::
sage: E = EllipticCurve([-1386747,368636886])
sage: E = EllipticCurve([-1386747, 368636886])
sage: T = E.torsion_subgroup(); T
Torsion Subgroup isomorphic to Z/2 + Z/8 associated to the Elliptic Curve defined by y^2 = x^3 - 1386747*x + 368636886 over Rational Field
sage: T == E.torsion_subgroup(algorithm="doud")
Expand Down

0 comments on commit 5db54b6

Please sign in to comment.