On Wed, 07 Feb 2007 22:50:01 -0700, Luis Finotti <[EMAIL PROTECTED]> wrote:
> I wanted to make a little script that given an elliptic curve and two
> points, it would plot the addition with the corresponding lines,
> labels, etc. to use in a talk for undergraduates.
>
> I wanted to only specify the x-coordinates and choices for the
> corresponding y's (the larger value, or the smaller), and have the
> script compute the exact value for the y's.  Since I would be
> plotting, I was working over the reals.  The problem is that the
> approximations do not allow me to define points on the curve, I think
> due to imprecision.   More precisely:
>
>
>
> sage: E=EllipticCurve(RR,[0,-1])
> sage: x0=RR(4)^(1/3)
> sage: y0=sqrt(RR(3))
> sage: E([x0,y0])

> I can implement the addition formula and work with the approximations
> instead of using Sage to add the points (or call Pari, which I think
> does it), but I thought I should see if I am missing something and/or
> if this is the expected behavior.

It's good that you asked.    Do this instead:

sage: E=EllipticCurve(RR,[0,-1])
sage: x0=RR(4)^(1/3)
sage: y0=sqrt(RR(3))
sage: p=E.point([x0,y0,1], check=False)
sage: p
(1.58740105196819 : 1.73205080756887 : 1)
sage: 2*p, 3*p
((1.58740105196819 : -1.73205080756887 : 1), (0.000000000000000 : 
1.00000000000000 : 0.000000000000000))

NOTE: It's important to input [x0,y0,1], i.e., a 3-tuple, since check=False 
really does no
checking about the input, and you'll get surprising failures later if you're 
not careful.

William

--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to