We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a82d4ed commit 8c073aeCopy full SHA for 8c073ae
2 files changed
src/flint/types/fmpq_mpoly.pyx
@@ -924,7 +924,8 @@ cdef class fmpq_mpoly(flint_mpoly):
924
fmpq_mpoly u
925
926
fmpq_mpoly_factor_init(fac, self.ctx.val)
927
- fmpq_mpoly_factor(fac, self.val, self.ctx.val)
+ if not fmpq_mpoly_factor(fac, self.val, self.ctx.val):
928
+ raise RuntimeError("factorisation failed")
929
res = [0] * fac.num
930
931
for i in range(fac.num):
src/flint/types/fmpz_mpoly.pyx
@@ -907,7 +907,8 @@ cdef class fmpz_mpoly(flint_mpoly):
907
fmpz_mpoly u
908
909
fmpz_mpoly_factor_init(fac, self.ctx.val)
910
- fmpz_mpoly_factor(fac, self.val, self.ctx.val)
+ if not fmpz_mpoly_factor(fac, self.val, self.ctx.val):
911
912
913
914
0 commit comments