File tree Expand file tree Collapse file tree 2 files changed +3
-29
lines changed
src/sage/schemes/elliptic_curves Expand file tree Collapse file tree 2 files changed +3
-29
lines changed Original file line number Diff line number Diff line change @@ -4612,32 +4612,6 @@ def log(self, base):
46124612
46134613 return ZZ (pari .elllog (self .curve (), self , base , n ))
46144614
4615- def discrete_log (self , Q ):
4616- r"""
4617- Legacy version of :meth:`log` with its arguments swapped.
4618-
4619- Note that this method uses the opposite argument ordering
4620- of all other logarithm methods in Sage; see :issue:`37150`.
4621-
4622- EXAMPLES::
4623-
4624- sage: E = EllipticCurve(j=GF(101)(5))
4625- sage: P, = E.gens()
4626- sage: (2*P).log(P)
4627- 2
4628- sage: (2*P).discrete_log(P)
4629- doctest:warning ...
4630- DeprecationWarning: The syntax P.discrete_log(Q) ... Please update your code. ...
4631- 45
4632- sage: P.discrete_log(2*P)
4633- 2
4634- """
4635- from sage .misc .superseded import deprecation
4636- deprecation (37150 , 'The syntax P.discrete_log(Q) is being replaced by '
4637- 'Q.log(P) to make the argument ordering of logarithm'
4638- ' methods in Sage uniform. Please update your code.' )
4639- return Q .log (self )
4640-
46414615 def padic_elliptic_logarithm (self , Q , p ):
46424616 r"""
46434617 Return the discrete logarithm of `Q` to base `P` = ``self``,
Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ def _point_outside_subgroup(P):
527527 sage: P = E(4, 35)
528528 sage: Q = _point_outside_subgroup(P); Q # random
529529 (14 : 11 : 1)
530- sage: Q.curve()(P).discrete_log(Q )
530+ sage: Q.log(P )
531531 Traceback (most recent call last):
532532 ...
533533 ValueError: ECDLog problem has no solution (...)
@@ -539,7 +539,7 @@ def _point_outside_subgroup(P):
539539 True
540540 sage: Q = _point_outside_subgroup(P); Q # random
541541 (35*z2 + 7 : 24*z2 + 7 : 1)
542- sage: Q.curve()(P).discrete_log(Q )
542+ sage: Q.log(Q. curve()(P))
543543 Traceback (most recent call last):
544544 ...
545545 ValueError: ECDLog problem has no solution (...)
@@ -554,7 +554,7 @@ def _point_outside_subgroup(P):
554554 (18*z2 + 46 : 58*z2 + 61 : 1)
555555 sage: Q in E
556556 True
557- sage: P.discrete_log(Q )
557+ sage: Q.log(P )
558558 Traceback (most recent call last):
559559 ...
560560 ValueError: ECDLog problem has no solution (...)
You can’t perform that action at this time.
0 commit comments