From 7227b6148ef852d831e586b80f47c6426364e72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Ahlb=C3=A4ck?= Date: Tue, 15 Oct 2024 13:10:39 +0200 Subject: [PATCH] Fix docstring for fmpz_poly_is_squarefree Co-authored-by: Max Horn --- doc/source/fmpz_poly.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/source/fmpz_poly.rst b/doc/source/fmpz_poly.rst index ab5e3a759d..2a34c014c9 100644 --- a/doc/source/fmpz_poly.rst +++ b/doc/source/fmpz_poly.rst @@ -1485,14 +1485,13 @@ Square-free .. function:: int _fmpz_poly_is_squarefree(const fmpz * poly, slong len) - - Returns whether the polynomial ``(poly, len)`` is square-free. - -.. function:: int fmpz_poly_is_squarefree(const fmpz_poly_t poly) + int fmpz_poly_is_squarefree(const fmpz_poly_t poly) Returns whether the polynomial ``poly`` is square-free. A non-zero - polynomial is defined to be square-free if it has no non-unit square - factors. We also define the zero polynomial to be square-free. + polynomial is defined to be square-free if its factorisation contains no + non-constant square factors. We also define the zero polynomial to be + square-free. This differs somewhat from the usual definition, e.g. we + consider the polynomial `4 x` in `\mathbb{Z}[x]` as square-free. Returns `1` if the length of ``poly`` is at most `2`. Returns whether the discriminant is zero for quadratic polynomials. Otherwise, returns