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

File 6045-heegner-more-fixes.patch, 1.5 KB (added by robertwb, 14 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 # We know that N|A, so A = N is optimal. N = self.conductor() b = ZZ(Integers(4*N)(D).sqrt(extend=False) % (2*N)) return (-b + D.sqrt(prec=prec)) / (2*N) return (-b + ZZ(D).sqrt(prec=prec)) / (2*N) def heegner_point(self, D, prec=None, max_prec=2000): """ sage: f.discriminant().factor() 47^2 """ D = ZZ(D) if not self.satisfies_heegner_hypothesis(D): raise ValueError, "D (=%s) must satisfy the Heegner hypothesis" % D if prec is None: # \Gamma_0(N) to a better representative? q = (2*CC.gen()*CC.pi()*z).exp() nterms = (-prec/q.abs().log2()).ceil() # Use Horner's rule to sum the integral of the the form # Use Horner's rule to sum the integral of the form enumerated_an = list(enumerate(self._E.anlist(nterms)))[1:] lattice_point = 0 for n, an in reversed(enumerated_an):