diff --git a/src/fmpz_poly/sub.c b/src/fmpz_poly/sub.c index 2abebddbd2..c9c94b58e4 100644 --- a/src/fmpz_poly/sub.c +++ b/src/fmpz_poly/sub.c @@ -75,7 +75,7 @@ void fmpz_poly_si_sub(fmpz_poly_t res, slong c, const fmpz_poly_t poly) if (c < 0) fmpz_sub_ui(res->coeffs + 0, res->coeffs + 0, -c); - else + else fmpz_add_ui(res->coeffs + 0, res->coeffs + 0, c); _fmpz_poly_normalise(res); @@ -87,7 +87,7 @@ void fmpz_poly_sub_fmpz(fmpz_poly_t res, const fmpz_poly_t poly, fmpz_t c) if (poly->length == 0) { fmpz_poly_set_fmpz(res, c); - fmpz_neg(res->coeffs + 0, res->coeffs + 0); + fmpz_poly_neg(res, res); } else {