# 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


5352  5352  # We know that NA, so A = N is optimal. 
5353  5353  N = self.conductor() 
5354  5354  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) 
5356  5356  
5357  5357  def heegner_point(self, D, prec=None, max_prec=2000): 
5358  5358  """ 
… 
… 

5400  5400  sage: f.discriminant().factor() 
5401  5401  47^2 
5402  5402  """ 
 5403  D = ZZ(D) 
5403  5404  if not self.satisfies_heegner_hypothesis(D): 
5404  5405  raise ValueError, "D (=%s) must satisfy the Heegner hypothesis" % D 
5405  5406  if prec is None: 
… 
… 

7023  7024  # \Gamma_0(N) to a better representative? 
7024  7025  q = (2*CC.gen()*CC.pi()*z).exp() 
7025  7026  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 
7027  7028  enumerated_an = list(enumerate(self._E.anlist(nterms)))[1:] 
7028  7029  lattice_point = 0 
7029  7030  for n, an in reversed(enumerated_an): 