Skip to content

Commit

Permalink
Fix doctest for multiplication_by_m
Browse files Browse the repository at this point in the history
The current doctest can create a singular curve, for example with `random-seed=129979402993014347526756638208394445987`.
  • Loading branch information
S17A05 committed Feb 15, 2024
1 parent 30b3d78 commit 2e84eda
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sage/schemes/elliptic_curves/ell_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2448,8 +2448,10 @@ def multiplication_by_m(self, m, x_only=False):
::
sage: p = 7
sage: K.<a> = GF(p^2)
sage: E = EllipticCurve(K, [K.random_element(), K.random_element()])
sage: K.<i> = GF(p^2)
sage: a, b = K.random_element(), K.random_element()
sage: while 4*a^3 + 27*b^2 == 0: a, b = K.random_element(), K.random_element()
sage: E = EllipticCurve(K, a, b)
sage: E.multiplication_by_m(p * 2)[0] == E.multiplication_by_m(p * 2, x_only=True)
True
"""
Expand Down

0 comments on commit 2e84eda

Please sign in to comment.