Opened 3 years ago

Closed 3 years ago

#29293 closed defect (worksforme)

pari call on x+O(x**2) fails

Reported by: Frédéric Chapoton Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords: pari
Cc: Travis Scrimshaw Merged in:
Authors: Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Frédéric Chapoton)

as follows:

sage: pari('x+O(x^2)')
---------------------------------------------------------------------------
PariError                                 Traceback (most recent call last)
<ipython-input-29-3844ab2b33fc> in <module>()
----> 1 pari('x+O(x^2)')

cypari2/pari_instance.pyx in cypari2.pari_instance.Pari.__call__()

cypari2/gen.pyx in cypari2.gen.objtogen()

cypari2/convert.pyx in cypari2.convert.PyObject_AsGEN()

cypari2/handle_error.pyx in cypari2.handle_error._pari_err_handle()

PariError: O(_^_): incorrect type in O (t_SER)

whereas it works in gp:

sage: %gp

  --> Switching to PARI/GP interpreter <--

pari: x+O(x^2)
x + O(x^2)

This prevents automatic testing of PARI code in oeis.

EDIT:

But this works:

sage: pari('x+O(x)^2')
x + O(x^2)

Change History (8)

comment:1 Changed 3 years ago by Frédéric Chapoton

Description: modified (diff)

comment:2 Changed 3 years ago by Frédéric Chapoton

Description: modified (diff)

comment:3 Changed 3 years ago by Matthias Köppe

I also see a failure in the cypari testsuite that looks similar

comment:4 Changed 3 years ago by Frédéric Chapoton

Hmm, it seem to works for me now. Invalid ticket ?

comment:5 Changed 3 years ago by Frédéric Chapoton

Cc: Travis Scrimshaw added

Travis, could you please double check that this works and the ticket is invalid ?

By the way, how do you do ? Are you confined as I am ?

comment:6 in reply to:  5 Changed 3 years ago by Travis Scrimshaw

Milestone: sage-9.1sage-duplicate/invalid/wontfix
Reviewers: Travis Scrimshaw
Status: newneeds_review

Replying to chapoton:

Travis, could you please double check that this works and the ticket is invalid ?

Yes, it now works. Since it is upstream in cypari2, I don't think we need to (or should) add a doctest.

By the way, how do you do ? Are you confined as I am ?

I am doing okay. I am confined to Australia since they closed their boarders and there are essentially no international flights from Australia. However I am still able to go outside and to my office at UQ. However, the situation seems to change daily without much warning, so who knows how long that will last.

comment:7 Changed 3 years ago by Travis Scrimshaw

Status: needs_reviewpositive_review

How are you doing?

Last edited 3 years ago by Travis Scrimshaw (previous) (diff)

comment:8 Changed 3 years ago by Frédéric Chapoton

Resolution: worksforme
Status: positive_reviewclosed

I going well, as far as possible.

Note: See TracTickets for help on using tickets.