Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p-adic height gives incorrect precision #635

Closed
sagetrac-dmharvey mannequin opened this issue Sep 10, 2007 · 3 comments
Closed

p-adic height gives incorrect precision #635

sagetrac-dmharvey mannequin opened this issue Sep 10, 2007 · 3 comments

Comments

@sagetrac-dmharvey
Copy link
Mannequin

sagetrac-dmharvey mannequin commented Sep 10, 2007

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.

Component: algebraic geometry

Issue created by migration from https://trac.sagemath.org/ticket/635

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-2.9 milestone Sep 11, 2007
@sagetrac-dmharvey sagetrac-dmharvey mannequin assigned sagetrac-dmharvey and unassigned williamstein Sep 11, 2007
@sagetrac-dmharvey
Copy link
Mannequin Author

sagetrac-dmharvey mannequin commented Sep 20, 2007

comment:3

Attachment: patch-635.hg.gz

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.

@sagetrac-dmharvey
Copy link
Mannequin Author

sagetrac-dmharvey mannequin commented Sep 26, 2007

comment:4

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.

@sagetrac-dmharvey sagetrac-dmharvey mannequin modified the milestones: sage-2.9, sage-2.8.6 Sep 26, 2007
@williamstein
Copy link
Contributor

comment:5

Changed to 2.8.7, since it will hopefully be in David Roe's patch already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant