On 16 mar, 23:27, daveloeffler <dave.loeff...@gmail.com> wrote: > Can you give an example where polynomials are being passed incorrectly > to Pari? There are some known bugs in Pari's own factorisation > routines (fixed in Pari 2.3.5, which should hopefully be in the next > Sage release), but if there are problems translating between Pari and > Sage polynomials that's worrying.
My error, there is no coercion for this class sage: N=NumberField(x^2-2,'a') sage: K=N['t'] sage: f=K.random_element() sage: pari(f) --------------------------------------------------------------------------- PariError Traceback (most recent call last) /home/luisfe/<ipython console> in <module>() /opt/SAGE/sage/local/lib/python2.6/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen.PariInstance.__call__ (sage/libs/pari/gen.c: 38930)() /opt/SAGE/sage/local/lib/python2.6/site-packages/sage/rings/polynomial/ polynomial_element.so in sage.rings.polynomial.polynomial_element.Polynomial._pari_ (sage/rings/ polynomial/polynomial_element.c:26227)() /opt/SAGE/sage/local/lib/python2.6/site-packages/sage/rings/polynomial/ polynomial_element.so in sage.rings.polynomial.polynomial_element.Polynomial._pari_with_name (sage/rings/polynomial/polynomial_element.c:26353)() /opt/SAGE/sage/local/lib/python2.6/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen._pari_trap (sage/libs/pari/gen.c:44387)() PariError: (8) I think that I was first trying some naive transformation like L = [pari(i) for i in f.list()] add([L[i]*pari('t')^i for i in range(f.degree())]) And confused this with the actual coercion model. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org