#4901: [with patch, needs review] bug in elliptic logarithm
--------------------------------+-------------------------------------------
 Reporter:  cremona             |        Owner:  was     
     Type:  defect              |       Status:  new     
 Priority:  major               |    Milestone:  sage-3.4
Component:  number theory       |   Resolution:          
 Keywords:  elliptic logarithm  |  
--------------------------------+-------------------------------------------
Changes (by cremona):

  * summary:  bug in elliptic logarithm => [with patch, needs review] bug
              in elliptic logarithm

Comment:

 The infinite loop was fixed by Alex, who then said
 {{{
 We seem to have run into a different problem, though:

 sage: E = EllipticCurve("4390c2")
 sage: P = E.gens()[0]
 sage: P.elliptic_logarithm(precision=64)
 0.000256387258865202254
 sage: P.elliptic_logarithm(precision=65)
 0.0002563872588652022535 + 0.004614954316673684681*I
 sage: P.elliptic_logarithm(precision=128)
 0.00025638725886520225353198932528666427412 +
 0.0046149543166736846806755335569568366865*I
 sage: P.elliptic_logarithm(precision=129)
 0.00025638725886520225353198932528666427412
 sage: P.elliptic_logarithm(precision=256)
 
0.0002563872588652022535319893252866642741168388008346370015005142128009610936373
 sage: P.elliptic_logarithm(precision=257)
 
0.00025638725886520225353198932528666427411683880083463700150051421280096109363730
 +
 
0.0046149543166736846806755335569568366865361459796795879146958143680521472570409*I

 This is quite upsetting.
 }}}
 to which John replied
 {{{
 The explanation is that  0.004614954316673684681*I is the imaginary
 period.  the point P is on the identity component so its e-log should
 be a real multiple of the real period, but is obviously only
 determined up to addition of any period.  Clearly the pari code does
 not bother about that.

 Here's one fix:  if P.is_on_identity_component(emb) is True then we
 know that the result should be real, so we can kill the imaginary
 part, and also normalise by making sure that the real part divided by
 the real period is in [0,1).  That's not hard.  And if P is not on the
 id. component, do the same but set the imaginary part to equal exactly
 half the imaginary period.
 }}}

 The attached patch does both.  Based on 3.2.2, tested on 32-bit and
 64-bit.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4901#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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