Opened 5 years ago
Closed 5 years ago
#16744 closed defect (fixed)
Random failure in elliptic_curves/constructor.py
Reported by: | vbraun | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.3 |
Component: | elliptic curves | Keywords: | random_fail |
Cc: | pbruin, cremona | Merged in: | |
Authors: | Peter Bruin | Reviewers: | Jeroen Demeyer |
Report Upstream: | N/A | Work issues: | |
Branch: | b4b48fd (Commits) | Commit: | b4b48fd23a1af1f276a973497d1c968b4c63aaaf |
Dependencies: | Stopgaps: |
Description
The code is from #11474:
sage -t --long src/sage/schemes/elliptic_curves/constructor.py ********************************************************************** File "src/sage/schemes/elliptic_curves/constructor.py", line 365, in sage.schemes.elliptic_curves.constructor.EllipticCurveFactory.create_key_and_extra_args Failed example: E.gens() Expected: [(-2 : 3 : 1), (1 : -1 : 1), (4 : -7 : 1)] Got: [(-2 : 3 : 1), (-7/4 : 25/8 : 1), (1 : -1 : 1)] ********************************************************************** File "src/sage/schemes/elliptic_curves/constructor.py", line 368, in sage.schemes.elliptic_curves.constructor.EllipticCurveFactory.create_key_and_extra_args Failed example: E.gens() Expected: [(-2 : 3 : 1), (1 : -1 : 1), (4 : -7 : 1)] Got: [(-2 : 3 : 1), (-7/4 : 25/8 : 1), (1 : -1 : 1)] ********************************************************************** 1 item had failures: 2 of 19 in sage.schemes.elliptic_curves.constructor.EllipticCurveFactory.create_key_and_extra_args [182 tests, 2 failures, 67.70 s]
Change History (5)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
I'm responsible for that doctest. The unexpected [(-2 : 3 : 1), (-7/4 : 25/8 : 1), (1 : -1 : 1)]
are the generators found by mwrank, not the ones in the database. The fact that the same curve is used in an earlier doctest in that file might be the cause; I'll look into it.
comment:3 Changed 5 years ago by
- Branch set to u/pbruin/16744-EllipticCurve_gens_random_failure
- Commit set to b4b48fd23a1af1f276a973497d1c968b4c63aaaf
- Priority changed from major to minor
- Status changed from new to needs_review
The problem was that curve 5077a1 could still be in the cache from an earlier doctest. In this case the gens
parameter (in the first failing doctest) would be ignored and the generators would be computed using mwrank. This commit replaces the curve 5077a1 by 433a1, which is not used in any other doctest.
comment:4 Changed 5 years ago by
- Reviewers set to Jeroen Demeyer
- Status changed from needs_review to positive_review
comment:5 Changed 5 years ago by
- Branch changed from u/pbruin/16744-EllipticCurve_gens_random_failure to b4b48fd23a1af1f276a973497d1c968b4c63aaaf
- Resolution set to fixed
- Status changed from positive_review to closed
It seems that this doctest is intended to illustrate that specifying "gens=" when cponstructing a curve from its label might be ignored when the curve is in the database. But there is a danger: the default database contains curves of conductors up to 10000 but does *not* contain their generators. So this is a test whose output will depend on whether or not the optional extended database is installed, something which we have been trying to avoid.
I hope the authors of #11474 (not me!) will be able to say whether I have got this diagnosis right.