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

PARI: allow non-gen as "self" argument for __pow__ #15785

Closed
jdemeyer opened this issue Feb 5, 2014 · 7 comments
Closed

PARI: allow non-gen as "self" argument for __pow__ #15785

jdemeyer opened this issue Feb 5, 2014 · 7 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Feb 5, 2014

sage: int(2)^pari(2.5)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-bbaff70c173b> in <module>()
----> 1 int(Integer(2))**pari(RealNumber('2.5'))

TypeError: Argument 'self' has incorrect type (expected sage.libs.pari.gen.gen, got int)

We should probably also implement modular __pow__ and fix a few other operators with the same problem.

CC: @pjbruin

Component: interfaces

Author: Jeroen Demeyer

Branch/Commit: u/jdemeyer/ticket/15785 @ 3be0702

Reviewer: David Roe

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

@jdemeyer jdemeyer added this to the sage-6.2 milestone Feb 5, 2014
@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

jdemeyer commented Feb 5, 2014

Branch: u/jdemeyer/ticket/15785

@jdemeyer
Copy link
Author

jdemeyer commented Feb 5, 2014

Commit: 3be0702

@jdemeyer
Copy link
Author

jdemeyer commented Feb 5, 2014

New commits:

3be0702PARI: fix pow, mod and shift operators

@roed314
Copy link
Contributor

roed314 commented Feb 5, 2014

comment:4

The patchbot is complaining about a failed merge, but it can't be too bad, since the branch displays as merging cleanly. I'm happy with the code changes and give it a positive review, subject to tests passing.

@roed314
Copy link
Contributor

roed314 commented Feb 5, 2014

Reviewer: David Roe

@jdemeyer
Copy link
Author

jdemeyer commented Feb 6, 2014

comment:5

The patchbot's complaints clearly have nothing to do with this ticket.

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

3 participants