Commit
2 years ago
gh-36445: fix ZeroDivisionError in gcd of sparse polynomials Fixes #36427 As pointed out in #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. ### :memo: 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: https://github.com/sagemath/sage/pull/36445 Reported by: DaveWitteMorris Reviewer(s): John H. Palmieri
Author
Release Manager
Loading