Commit a875710
Release Manager
gh-38720: Raise exception when factoring zero polynomial
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->
The zero polynomial doesn't have a factorization or square-free
factorization, so
```
PolynomialRing(GF(7), 'x').zero().factor()
PolynomialRing(GF(7), 'x').zero().squarefree_decomposition()
```
should raise errors instead of returning zero. This patch fixes this
behavior.
URL: #38720
Reported by: Kyle Hofmann
Reviewer(s): Kwankyu Lee
1 file changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
765 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
766 | 778 | | |
767 | 779 | | |
768 | 780 | | |
| |||
803 | 815 | | |
804 | 816 | | |
805 | 817 | | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
806 | 827 | | |
807 | | - | |
| 828 | + | |
| 829 | + | |
808 | 830 | | |
| 831 | + | |
809 | 832 | | |
810 | 833 | | |
811 | 834 | | |
| |||
0 commit comments