Closed kedlaya closed 1 day ago
LGTM.
I noticed there is also a segfault when the degree is negative. The root cause is passing a negative degree to dfs_manager, so I moved the check to catch both issues at once, and added a second doctest.
Documentation preview for this PR (built with commit 95d8beafba006e36b0dc227625891bb940a1e7f8; changes) is ready! :tada: This preview will update shortly after each push to this PR.
Fix segfault for Weil polynomials
Eliminate a segfault that occurs when asking for Weil polynomials of degree 0 and sign -1 (which do not exist, so the iterator should return empty). This fixes #37860.