Ticket #635 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[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: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

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

patch-635.hg Download (2.1 KB) - added by dmharvey 3 years ago.

Change History

Changed 3 years ago by mabshoff

  • milestone set to sage-2.9

Changed 3 years ago by dmharvey

  • owner changed from was to dmharvey
  • status changed from new to assigned

Changed 3 years ago by dmharvey

Changed 3 years ago by dmharvey

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.

Changed 3 years ago by dmharvey

  • summary changed from p-adic height gives incorrect precision to [with patch] p-adic height gives incorrect precision
  • milestone changed from sage-2.9 to sage-2.8.6

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.

Changed 3 years ago by was

  • 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.

Changed 3 years ago by was

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.