ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 31 Jan 2019 04:54:03 -0600x coordinate Of an Elliptic Curve pointhttps://ask.sagemath.org/question/45239/x-coordinate-of-an-elliptic-curve-point/I am defining an Elliptic curve E and then taking a random point P over E. now I want to print the x coordinate of the elliptic curve. How to do that ?
F.<z>=GF(2^11, modulus= conway_polynomial(2,11))
j= F.random_element()
E= EllipticCurve_from_j(j)
P= E.random_point()
Now I want to define w to be the x co-ordinate of P. Thu, 31 Jan 2019 02:04:37 -0600https://ask.sagemath.org/question/45239/x-coordinate-of-an-elliptic-curve-point/Answer by tmonteil for <p>I am defining an Elliptic curve E and then taking a random point P over E. now I want to print the x coordinate of the elliptic curve. How to do that ?</p>
<pre><code>F.<z>=GF(2^11, modulus= conway_polynomial(2,11))
j= F.random_element()
E= EllipticCurve_from_j(j)
P= E.random_point()
</code></pre>
<p>Now I want to define w to be the x co-ordinate of P. </p>
https://ask.sagemath.org/question/45239/x-coordinate-of-an-elliptic-curve-point/?answer=45241#post-id-45241Maybe:
sage: P[0]
Thu, 31 Jan 2019 03:51:43 -0600https://ask.sagemath.org/question/45239/x-coordinate-of-an-elliptic-curve-point/?answer=45241#post-id-45241Comment by rburing for <p>Maybe:</p>
<pre><code>sage: P[0]
</code></pre>
https://ask.sagemath.org/question/45239/x-coordinate-of-an-elliptic-curve-point/?comment=45242#post-id-45242But be careful when the random point is the point at infinity. It seems the OP wants a random point which is not at infinity.Thu, 31 Jan 2019 04:54:03 -0600https://ask.sagemath.org/question/45239/x-coordinate-of-an-elliptic-curve-point/?comment=45242#post-id-45242