1 | initial version |
Here is an alternative answer, to show points...
sage: EC = EllipticCurve(GF(101), [2, 3])
sage: EC
Elliptic Curve defined by y^2 = x^3 + 2*x + 3 over Finite Field of size 101
sage: P = EC.random_point()
sage: P
(98 : 24 : 1)
sage: P.xy()
(98, 24)
sage: ORIGIN = EC.point(0)
sage: ORIGIN.xy()
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
As seen, there is a problem to represent P
using the P.xy()
method (only) in the case the point needed is the $O$ point on the elliptic curve (declared in the shape $y^2=x^3+ax+b$).
Note that one can easily access the components and do stuff with them as best suited for the own taste...
sage: P
(98 : 24 : 1)
sage: x, y, z = P
sage: x, y, z
(98, 24, 1)
sage:
sage: x, y, z = ORIGIN
sage: x, y, z
(0, 1, 0)