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

Conversion of pari elements to Sage fails on some negative valuation elements #12625

Closed
roed314 opened this issue Mar 3, 2012 · 7 comments
Closed

Comments

@roed314
Copy link
Contributor

roed314 commented Mar 3, 2012

sage: K = Qp(11,5)
sage: pari(K(11^-5)).sage()
ArithmeticError
sage: ZZ(pari(Qp(11)(11^-7)))
SEGFAULT

Component: padics

Author: David Roe

Reviewer: Xavier Caruso

Merged: sage-5.0.beta8

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

@roed314 roed314 added this to the sage-5.0 milestone Mar 3, 2012
@roed314 roed314 self-assigned this Mar 3, 2012
@roed314
Copy link
Contributor Author

roed314 commented Mar 3, 2012

comment:1

Attachment: 12625.patch.gz

@xcaruso
Copy link
Contributor

xcaruso commented Mar 3, 2012

comment:2

I propose to modify the function padicprec() so that it computes itself the underlying prime number. Currently, one have:

sage: K = Qp(11,5)
sage: x = K(5)
sage: x
5 + O(11^5)
sage: y = pari(x)
sage: y.padicprec(11)
5
sage: y.padicprec(17)
  ***   not the same prime in padicprec.
  ***   Error in the PARI system. End of program.

@xcaruso
Copy link
Contributor

xcaruso commented Mar 3, 2012

Reviewer: Xavier Caruso

@williamstein
Copy link
Contributor

Attachment: trac_12625-review.patch.gz

apply after the other patch

@williamstein
Copy link
Contributor

comment:3

I'm happy with this, but due to the amount I added, somebody else (anybody!) should sign off on it.

@roed314
Copy link
Contributor Author

roed314 commented Mar 5, 2012

comment:4

Yep. That looks good.

@jdemeyer
Copy link

Merged: sage-5.0.beta8

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

4 participants