Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-36445: fix ZeroDivisionError in gcd of sparse polynomials
Fixes sagemath#36427 As pointed out in sagemath#36427, attempting to calculate the gcd of two sparse polynomials raises a `ZeroDivisionError` if one of the polynomials is constant, and the other has large degree (at least 100). This is caused by an error in the code that tests whether converting either of the polynomials to FLINT will be very slow. To fix this, we check each polynomial individually, instead of trying to consider both polynomials at once. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. URL: sagemath#36445 Reported by: DaveWitteMorris Reviewer(s): John H. Palmieri
- Loading branch information