First time here? Check out the FAQ!

Ask Your Question
1

Pari error when factoring polynomial

asked 6 years ago

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 "p_is_2_test.sage.py", 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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

Jeroen Demeyer gravatar image

This is a known (but fixed) bug in PARI/GP: https://pari.math.u-bordeaux.fr/cgi-b...

If you know how to patch Sage, applying https://trac.sagemath.org/ticket/25567 will fix it.

Preview: (hide)
link

Comments

Thanks! I will look into it.

MadPidgeon gravatar imageMadPidgeon ( 6 years ago )

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

Stats

Asked: 6 years ago

Seen: 404 times

Last updated: Jun 27 '18