Ask Your Question
1

Integer polynomial factorization and RecursionError

asked 2022-12-21 01:31:31 +0100

nickux gravatar image

Hi all,

I use sage to factorize integer polynomials, sometimes with very large coefficients. But when the polynomial is too large (for example a degree 3885), I get the following error

RecursionError: maximum recursion depth exceeded during compilation

I have tried to set a higher recursion limit through, e.g.

sys.setrecursionlimit(10000)

But I still get the same error. The script file is also large (more than 7Mb) and the sage.py file is even larger (22Mb).

Thanks for your help.

edit retag flag offensive close merge delete

Comments

Please provide an example illustrating the issue.

Max Alekseyev gravatar imageMax Alekseyev ( 2022-12-24 04:16:32 +0100 )edit

Sure. Here is a link to a script file producing such an error https://nick-ux.org/~regnault/example.sage (example.sage)

nickux gravatar imagenickux ( 2022-12-25 03:30:39 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-01-10 15:41:45 +0100

nickux gravatar image

Ok.

I manage to find a workaround. For people interested in, I directly wrote a python code rather than letting sage writing its own python. From there, I split the polynomial such that each smaller polynomial contains at most 1000 terms. Then I define the full polynomial as the sum of these smaller ones.

edit flag offensive delete link more

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: 2022-12-21 01:31:31 +0100

Seen: 153 times

Last updated: Jan 10 '23