Ask Your Question

Pari error when factoring polynomial

asked 2018-06-26 21:58:15 +0100

MadPidgeon gravatar image

I ran the following code to factor a polynomial over a number field:

U.<z> = CyclotomicField(32)
P.<x> = PolynomialRing(U)
f = x^16-256
print f.factor()

This code works for all substitutions of 256 by another value I have tried, but this one gives an error:

Traceback (most recent call last):
File "", line 10, in <module>
print f.factor()
File "sage/rings/polynomial/polynomial_element.pyx", line 4199, in sage.rings.polynomial.polynomial_element.Polynomial.factor (build/cythonized/sage/rings/polynomial/polynomial_element.c:39418)
File "cypari2/auto_gen.pxi", line 17246, in cypari2.gen.Gen_auto.nffactor
File "cypari2/handle_error.pyx", line 196, in cypari2.handle_error._pari_err_handle
cypari2.handle_error.PariError: inconsistent concatenation t_COL (8 elts) , t_VEC (8 elts)

This seems like some bug in sage, but I am not quite sure what to make of the error. Does anyone know how to deal with this error and to properly let sage factor this polynomial?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-27 07:32:51 +0100

Jeroen Demeyer gravatar image

This is a known (but fixed) bug in PARI/GP:

If you know how to patch Sage, applying will fix it.

edit flag offensive delete link more


Thanks! I will look into it.

MadPidgeon gravatar imageMadPidgeon ( 2018-06-27 11:43:31 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-06-26 21:58:15 +0100

Seen: 260 times

Last updated: Jun 27 '18