Opened 13 years ago
Closed 13 years ago
#635 closed defect (fixed)
[with patch] p-adic height gives incorrect precision
Reported by: | dmharvey | Owned by: | dmharvey |
---|---|---|---|
Priority: | major | Milestone: | sage-2.8.7 |
Component: | algebraic geometry | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
If I ask for precision 10, I get precision 9:
sage: E = EllipticCurve("37a") sage: P = E.gens()[0] sage: h = E.padic_height(5, 10) sage: h(P) 4*5 + 3*5^2 + 3*5^3 + 4*5^4 + 4*5^5 + 5^6 + 4*5^8 + O(5^9)
It didn't use to behave this way; it probably happened accidentally as a consequence of some changes chris wuthrich made, and it appears that the doctests were modified to make this behaviour the "correct" one. This should be fixed, because in the large prime case it ends up wasting a lot of time computing extra digits in intermediate steps.
Attachments (1)
Change History (7)
comment:1 Changed 13 years ago by
- Milestone set to sage-2.9
comment:2 Changed 13 years ago by
- Owner changed from was to dmharvey
- Status changed from new to assigned
Changed 13 years ago by
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
- Milestone changed from sage-2.9 to sage-2.8.6
- Summary changed from p-adic height gives incorrect precision to [with patch] p-adic height gives incorrect precision
I've tried the same patch against 2.8.5. Pretty much the same thing happens: the ordinary doctests (on ell_rational_field.py
) are all fine, but long doctests produce *intermittent* segfaults... on some invocations everything is fine, and sometimes it segfaults. I have tried debugging with gdb, but either (a) the problem doesn't occur, or (b) I get an empty stack trace.
I'm marking this as [with patch], because I think this patch is okay, and it's just exposing some other low-level bug somewhere else. If someone can track down the crasher that would be great.
comment:5 Changed 13 years ago by
- Milestone changed from sage-2.8.6 to sage-2.8.7
Changed to 2.8.7, since it will hopefully be in David Roe's patch already.
comment:6 Changed 13 years ago by
- Resolution set to fixed
- Status changed from assigned to closed
Attached patch fixes the precision problem, but seems to introduce some weird segfault-like issues when running long doctests. I have no idea why this is happening because I'm only touching high-level python code. My guess is that those issues are independent of this one.