Ticket #6045: 6045-heegner-more-fixes.patch

File 6045-heegner-more-fixes.patch, 1.5 KB (added by robertwb, 12 years ago)
  • sage/schemes/elliptic_curves/ell_rational_field.py

    # HG changeset patch
    # User Robert Bradshaw <robertwb@math.washington.edu>
    # Date 1246745649 25200
    # Node ID 03e1321834b7bc9f99aead29dcfb2bd357054f42
    # Parent  b0ca7b122de526b147903018e18258e5ff92806f
    Heegner point refinement
    
    diff -r b0ca7b122de5 -r 03e1321834b7 sage/schemes/elliptic_curves/ell_rational_field.py
    a b  
    53525352        # We know that N|A, so A = N is optimal.
    53535353        N = self.conductor()
    53545354        b = ZZ(Integers(4*N)(D).sqrt(extend=False) % (2*N))
    5355         return (-b + D.sqrt(prec=prec)) / (2*N)
     5355        return (-b + ZZ(D).sqrt(prec=prec)) / (2*N)
    53565356
    53575357    def heegner_point(self, D, prec=None, max_prec=2000):
    53585358        """
     
    54005400            sage: f.discriminant().factor()
    54015401            47^2
    54025402        """
     5403        D = ZZ(D)
    54035404        if not self.satisfies_heegner_hypothesis(D):
    54045405            raise ValueError, "D (=%s) must satisfy the Heegner hypothesis" % D
    54055406        if prec is None:
     
    70237024        # \Gamma_0(N) to a better representative?
    70247025        q = (2*CC.gen()*CC.pi()*z).exp()
    70257026        nterms = (-prec/q.abs().log2()).ceil()
    7026         # Use Horner's rule to sum the integral of the the form
     7027        # Use Horner's rule to sum the integral of the form
    70277028        enumerated_an = list(enumerate(self._E.anlist(nterms)))[1:]
    70287029        lattice_point = 0
    70297030        for n, an in reversed(enumerated_an):