#13951: (non)archimedian_local_height broken for rational points on elliptic 
curves
over Q
---------------------------------------------+------------------------------
       Reporter:  pbruin                     |         Owner:  cremona          
        
           Type:  defect                     |        Status:  needs_review     
        
       Priority:  major                      |     Milestone:  sage-5.10        
        
      Component:  elliptic curves            |    Resolution:                   
        
       Keywords:  local heights              |   Work issues:                   
        
Report Upstream:  N/A                        |     Reviewers:  John Cremona, 
Peter Bruin
        Authors:  Peter Bruin, John Cremona  |     Merged in:                   
        
   Dependencies:  #12509, #13953, #14609     |      Stopgaps:                   
        
---------------------------------------------+------------------------------

Comment (by cremona):

 One small point:  on line 2618 you set w=1, which will be a python int,
 and then you multiply the final returned height by w (in 3 places, 2 with
 the cached value and one when it is computed).  Maybe I am old-fashioned,
 but I don't like multiplying by 1: can we reply on python doing nothing
 when that value of 1 is a plain python int?  If it were not for this
 scaling needing to be done in three places I would suggest not defining w
 at all and ending the function with
 {{{
 if normalised:
     return height
 else:
     return height * K.degree()
 }}}
 but it is not very nice to add that three times.

 Perhaps multiplying by one in the usual (and default) case is not serious.

 The only other thing to point out is that there is no new doctest to show
 the effect of the normalisation parameter.  How about:
 {{{
 sage: E = EllipticCurve('37a1')
 sage: P = E([0,0])
 sage: P.height()
 0.0511114082399688
 sage: P.height(normalised=False)
 0.0511114082399688
 sage: K.<z> = CyclotomicField(5) # or perhaps something simpler
 sage: EK = E.change_ring(K)
 sage: PK = EK([0,0])
 sage: PK.height()
 0.0511114082399688
 sage: PK.height(normalised=False)
 0.204445632959875
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13951#comment:24>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to