POLY: fix infinite loop for non-invertible polynomials
This commit is contained in:
parent
c9fcb7aa99
commit
cef08a4ae0
@ -352,6 +352,9 @@ poly_inverse_poly_q(fmpz_poly_t Fq,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fmpz_poly_is_zero(g) == 1)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
if (fmpz_poly_degree(f) == 0)
|
if (fmpz_poly_degree(f) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -464,6 +467,9 @@ poly_inverse_poly_p(fmpz_poly_t Fp,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fmpz_poly_is_zero(g) == 1)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
if (fmpz_poly_degree(f) == 0)
|
if (fmpz_poly_degree(f) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user