#5252: [with patch, needs review] elliptic curves: P.height() lies about its
precision
---------------------------+------------------------------------------------
Reporter: AlexGhitza | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.1
Component: number theory | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Changes (by cremona):
* summary: elliptic curves: P.height() lies about its precision => [with
patch, needs review] elliptic curves:
P.height() lies about its precision
Comment:
Alex, I think that the ellheight() function needs to be given the
precision parameter, despite what it says in the docstring for that
function:
{{{
sage: E = EllipticCurve([1, -1, 1, -2063758701246626370773726978,
32838647793306133075103747085833809114881])
sage: P = E([-30987785091199, 258909576181697016447])
sage: PE = E.pari_curve(prec=500)
sage: PE.ellheight([P[0],P[1],P[2]]).python()
25.8603170675461907
sage: PE.ellheight([P[0],P[1],P[2]],precision=500).python()
25.8603170675461907438688407407351103230988729038444162155771710417835725129551130570889813281792157278507639909972112856019190236125362914195452321719909
}}}
(Here I output the .python() conversion since otherwise it uses the gp
default precision for output so you cannot see what is going on).
After my patch, your example works fine:
{{{
sage: E = EllipticCurve([1, -1, 1, -2063758701246626370773726978,
32838647793306133075103747085833809114881])
sage: P = E([-30987785091199, 258909576181697016447])
sage: P.height()
25.8603170675462
sage: P.height(precision=100)
25.860317067546190743868840741
sage: P.height(precision=250)
25.860317067546190743868840740735110323098872903844416215577171041783572513
sage: P.height(precision=500)
25.8603170675461907438688407407351103230988729038444162155771710417835725129551130570889813281792157278507639909972112856019190236125362914195452321720
}}}
The patch (based on 3.3.rc0) corrects height(), adds a doctest, and
corrects the docstring in gen.pyx. I also had to correct a doctest output
in ell_rational_field.py.
NB The output at precision 500 for the new doctest looks odd on trac but
is ok in the source file.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5252#comment:2>
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
-~----------~----~----~----~------~----~------~--~---