#16680: Improve handling of "algorithm" parameter in
EllipticCurve_finite_field.cardinality()
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  elliptic curves    |   Resolution:
       Keywords:  elliptic curve     |    Merged in:
  cardinality                        |    Reviewers:  Travis Scrimshaw,
        Authors:  Peter Bruin,       |  Peter Bruin
  Travis Scrimshaw                   |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  545410ead180904d6527f0ab54796b1d7e334e43
  u/pbruin/16680-elliptic_curve_cardinality_doctest|     Stopgaps:
   Dependencies:  #11474             |
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Peter Bruin, Travis Scrimshaw', 'oldvalue': u'Peter 
Bruin'}):

 * author:  Peter Bruin => Peter Bruin, Travis Scrimshaw
 * priority:  trivial => minor
 * branch:  u/tscrim/elliptic_curve_cardinality-16680 =>
     u/pbruin/16680-elliptic_curve_cardinality_doctest
 * reviewer:  Travis Scrimshaw => Travis Scrimshaw, Peter Bruin
 * keywords:   => elliptic curve cardinality
 * commit:  e058079e4c09923671b09edf681292d5d82c1903 =>
     545410ead180904d6527f0ab54796b1d7e334e43
 * type:  task => enhancement


Old description:

> The following doctest in `ell_finite_field.py` can fail (by returning a
> cached result) because the same curve is used in an earlier doctest and
> may be cached by the `UniqueFactory` from #11474:
> {{{
> sage:
> EllipticCurve(GF(10007),[1,2,3,4,5]).cardinality(algorithm='foobar')
> Traceback (most recent call last):
> ...
> ValueError: Algorithm is not known
> }}}
> A trivial solution is to use a different curve for this test.

New description:

 The following doctest in `ell_finite_field.py` can fail (by returning a
 cached result) because the same curve is used in an earlier doctest and
 may be cached by the `UniqueFactory` from #11474:
 {{{
 sage: EllipticCurve(GF(10007),[1,2,3,4,5]).cardinality(algorithm='foobar')
 Traceback (most recent call last):
 ...
 ValueError: Algorithm is not known
 }}}
 A trivial solution is to use a different curve for this test.

 This ticket also makes the handling of the `algorithm` parameter more
 consistent and polishes the documentation a bit.

--

Comment:

 Replying to [comment:6 pbruin]:
 > Your doctest will probably fail if the elliptic curve is garbage-
 collected between the two invocations.
 Fixed this, also polished the documentation a bit more and made
 `heuristic` an obsolete synonym for `pari`.  (`heuristic` just defaulted
 to `pari`, so there isn't any real heuristic going on, and "heuristic" may
 also be misinterpreted as saying that the result is not guaranteed to be
 correct.)

--
Ticket URL: <http://trac.sagemath.org/ticket/16680#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to