Opened 6 years ago

Closed 6 years ago

#15785 closed defect (fixed)

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

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-6.2
Component: interfaces Keywords:
Cc: pbruin Merged in:
Authors: Jeroen Demeyer Reviewers: David Roe
Report Upstream: N/A Work issues:
Branch: u/jdemeyer/ticket/15785 (Commits) Commit: 3be07026a77a74d56e8dd91cc301efc43b716b4e
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

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.

Change History (6)

comment:1 Changed 6 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 6 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/15785
  • Created changed from 02/05/14 10:01:00 to 02/05/14 10:01:00
  • Modified changed from 02/05/14 10:21:35 to 02/05/14 10:21:35

comment:3 Changed 6 years ago by jdemeyer

  • Commit set to 3be07026a77a74d56e8dd91cc301efc43b716b4e
  • Status changed from new to needs_review

New commits:

3be0702PARI: fix pow, mod and shift operators

comment:4 Changed 6 years ago by roed

  • Reviewers set to David Roe
  • Status changed from needs_review to needs_info

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.

comment:5 Changed 6 years ago by jdemeyer

  • Status changed from needs_info to positive_review

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

comment:6 Changed 6 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.