Opened 14 years ago
Closed 14 years ago
#4901 closed defect (fixed)
[with patch, positive review] bug in elliptic logarithm
Reported by: | cremona | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-3.3 |
Component: | number theory | Keywords: | elliptic logarithm |
Cc: | AlexGhitza | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
#4214 introduced something which causes this example to fail:
sage: EllipticCurve("4390c2").gens()[0].elliptic_logarithm() --------------------------------------------------------------------------- MemoryError Traceback (most recent call last) /home/john/sage-3.2.2.rc1/devel/sage-elllog/<ipython console> in <module>() /home/john/sage-3.2.2.rc1/local/lib/python2.5/site-packages/sage/schemes/elliptic_curves/ell_point.py in elliptic_logarithm(self, embedding, precision, algorithm) 1211 E_pari = ER.pari_curve(prec=precision) 1212 pt_pari = [pari(emb(self[0])), pari(emb(self[1]))] -> 1213 log_pari = E_pari.ellpointtoz(pt_pari, precision=precision) 1214 while prec_words_to_bits(log_pari.precision()) < precision: 1215 working_prec = 2*precision /home/john/sage-3.2.2.rc1/local/lib/python2.5/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen._pari_trap (sage/libs/pari/gen.c:38603)() /home/john/sage-3.2.2.rc1/local/lib/python2.5/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen.PariInstance.allocatemem (sage/libs/pari/gen.c:34732)() /home/john/sage-3.2.2.rc1/local/lib/python2.5/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen.init_stack (sage/libs/pari/gen.c:37647)() MemoryError: Unable to allocate 4096000000 bytes memory for PARI.
caused by an infinite loop.
The problem has been diagnosed by me and Alex and I'll post a patch shortly.
Attachments (1)
Change History (4)
Changed 14 years ago by
comment:1 Changed 14 years ago by
- Summary changed from bug in elliptic logarithm to [with patch, needs review] bug in elliptic logarithm
comment:2 Changed 14 years ago by
- Summary changed from [with patch, needs review] bug in elliptic logarithm to [with patch, positive review] bug in elliptic logarithm
Looks good.
comment:3 Changed 14 years ago by
- Milestone changed from sage-3.4.1 to sage-3.3
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 3.3.alpha0
Note: See
TracTickets for help on using
tickets.
The infinite loop was fixed by Alex, who then said
to which John replied
The attached patch does both. Based on 3.2.2, tested on 32-bit and 64-bit.