#11767: elliptic_logarithm of high precision points often hangs forever
-------------------------------+--------------------------------------------
   Reporter:  was              |          Owner:  cremona     
       Type:  defect           |         Status:  needs_review
   Priority:  major            |      Milestone:  sage-4.7.2  
  Component:  elliptic curves  |       Keywords:              
Work_issues:                   |       Upstream:  N/A         
   Reviewer:                   |         Author:              
     Merged:                   |   Dependencies:              
-------------------------------+--------------------------------------------

Comment(by zimmerma):

 I have added a 2nd patch (to be applied after the first one) which solves
 the typo, and
 modifies the termination condition.

 As far as I understand, the termination is when the (complex) variable
 {{{r}}} becomes 1.
 We compute the complex norm of {{{r}}}, subtract one from it, and compare
 to {{{eps}}}
 which is {{{2^(-prec2)}}}.

 If {{{r}}} is near one, typically {{{r.abs()}}} will be 1, or one of the
 floating-point numbers
 near from 1, which are {{{1-2^(-prec2)}}} and {{{1+2^(1-prec2)}}}. The
 subtraction of 1 is exact,
 and the only case where the comparison {{{r.abs()-1 < eps}}} can be true
 is when {{{r=1}}}.

 What I've done is that I've changed the termination condition to also
 check whether the
 relative difference {{{r.abs()-1}}} does not change from one step to the
 next one.
 Since {{{r.abs()-1}}} converges to one, this should catch cases where it
 stays at say
 {{{1-2^(-prec2)}}} due to rounding errors. However it will not catch cases
 where it oscillates
 between two different values near from 1.

 Paul

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11767#comment:7>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to