Opened 12 years ago

Closed 8 years ago

#9948 closed defect (fixed)

Conversion between p-adics and PARI/GP

Reported by: jdemeyer Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords: sd35
Cc: mstreng Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: gp(pAdicField(5)(0))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/jdemeyer/<ipython console> in <module>()

/usr/local/src/sage-4.6.prealpha4/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc in __call__(self, x, name)
   1032             return cls(self, x, name=name)
   1033         try:
-> 1034             return self._coerce_from_special_method(x)
   1035         except TypeError:
   1036             raise

/usr/local/src/sage-4.6.prealpha4/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc in _coerce_from_special_method(self, x)
   1056             s = '_gp_'
   1057         try:
-> 1058             return (x.__getattribute__(s))(self)
   1059         except AttributeError:
   1060             return self(x._interface_init_())

/usr/local/src/sage-4.6.prealpha4/local/lib/python2.6/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject._gp_ (sage/structure/sage_object.c:4092)()

/usr/local/src/sage-4.6.prealpha4/local/lib/python2.6/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject._interface_ (sage/structure/sage_object.c:3501)()

/usr/local/src/sage-4.6.prealpha4/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc in __call__(self, x, name)
   1030
   1031         if isinstance(x, basestring):
-> 1032             return cls(self, x, name=name)
   1033         try:
   1034             return self._coerce_from_special_method(x)

/usr/local/src/sage-4.6.prealpha4/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
   1449             except (TypeError, KeyboardInterrupt, RuntimeError, ValueError), x:
   1450                 self._session_number = -1
-> 1451                 raise TypeError, x
   1452         self._session_number = parent._session_number
   1453

TypeError: Error executing code in GP/PARI:
CODE:
        sage[2]=0 + O(5^+Infinity);
GP/PARI ERROR:
  ***   at top-level: sage[2]=0+O(5^+Infinity)
  ***                                ^---------
  ***   gtos expected an integer, got 'Infinity'.

Attachments (1)

9948_padic_pari_gp.patch (3.8 KB) - added by jdemeyer 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by jdemeyer

comment:1 Changed 10 years ago by jdemeyer

  • Milestone set to sage-4.8
  • Summary changed from Conversion of p-adic to gp is buggy because of "+Infinity" exponent to Conversion between p-adics and PARI/GP

comment:2 Changed 10 years ago by jdemeyer

  • Dependencies set to #12203

comment:3 Changed 10 years ago by mstreng

  • Cc mstreng added
  • Keywords sd35 added

comment:4 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:5 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:6 Changed 8 years ago by pbruin

  • Milestone changed from sage-6.2 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

This seems to have been fixed in the meantime. In Sage 6.2.beta6:

sage: gp(pAdicField(5)(0))
0
sage: pari(pAdicField(5)(0))
0

I propose to close this as invalid/worksforme/whatever...

comment:7 Changed 8 years ago by jdemeyer

  • Dependencies #12203 deleted
  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

Yes, seems fixed.

comment:8 Changed 8 years ago by vbraun

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