Skip to content

Commit 3e61e7d

Browse files
committed
reviewer comments
1 parent cf800a6 commit 3e61e7d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sage/schemes/elliptic_curves/ell_point.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,8 @@ def has_order(self, n):
559559
True
560560
sage: P._order
561561
7
562+
sage: P.has_order(7)
563+
True
562564
563565
It also works with a :class:`~sage.structure.factorization.Factorization` object::
564566
@@ -568,6 +570,8 @@ def has_order(self, n):
568570
True
569571
sage: P._order
570572
21
573+
sage: P.has_order(factor(21))
574+
True
571575
572576
This method can be much faster than computing the order and comparing::
573577
@@ -613,6 +617,14 @@ def has_order(self, n):
613617
CPU times: user 10 µs, sys: 1e+03 ns, total: 11 µs
614618
Wall time: 14.5 µs
615619
5326738796327623094747867617954605554069371494832722337612446642054009560026576537626892113026381253624626941643949444792662881241621373288942880288065660
620+
621+
TESTS::
622+
623+
sage: E = EllipticCurve([1,2,3,4,5])
624+
sage: E(0).has_order(1)
625+
True
626+
sage: E(0).has_order(Factorization([]))
627+
True
616628
"""
617629
if hasattr(self, '_order'): # already known
618630
if not isinstance(n, Integer):

0 commit comments

Comments
 (0)