Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FLINT polynomial factor() interruptible #35335

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

remyoudompheng
Copy link
Contributor

📚 Description

This is useful for large degree polynomials.
Currently FLINT factorization of Zmod(n) polynomials for small n cannot be interrupted using Ctrl-C.

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

None

This is useful for large degree polynomials.
@github-actions
Copy link

Documentation preview for this PR is ready! 🎉
Built with commit: 21d1151

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little apprehensive about the test on a fast computer (well, most likely coupled with improvements to FLINT). However, it seems quite overall for now and it is documented what is being tested.

@jaysharma0909
Copy link

@tscrim Could you please tell me where can I get the code of gcd algorithms in sagemath

@tscrim
Copy link
Collaborator

tscrim commented Mar 25, 2023

@its-believe Start with gcd?? and/or import_statements(gcd).

Additionally, this is completely the wrong place to ask such questions.

@videlec
Copy link
Contributor

videlec commented Mar 27, 2023

I am a little apprehensive about the test on a fast computer (well, most likely coupled with improvements to FLINT). However, it seems quite overall for now and it is documented what is being tested.

The factorization of the polynomial of order ~20000 in the test will most likely not terminate in less than a minute

sage: f = R.random_element(1000) * R.random_element(1000)
sage: %time u = f.factor()
Wall time: 1.06 s
sage: f = R.random_element(2000) * R.random_element(2000)
sage: %time u = f.factor()
Wall time: 4.93 s
sage: f = R.random_element(3000) * R.random_element(3000)
sage: %time u = f.factor()
Wall time: 12.5 s

@vbraun vbraun merged commit 1910013 into sagemath:develop Apr 6, 2023
@mkoeppe mkoeppe added this to the sage-10.0 milestone Apr 7, 2023
@remyoudompheng remyoudompheng deleted the flint-sig branch April 14, 2023 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants