The module fmpq_poly
provides functions for performing arithmetic on rational polynomials in , represented as quotients of integer polynomials of type
fmpz_poly_t
and denominators of type fmpz_t
. These functions start with the prefix fmpq_poly_
.
Rational polynomials are stored in objects of type fmpq_poly_t, which is an array of fmpq_poly_struct's of length one. This permits passing parameters of type fmpq_poly_t by reference. We also define the type fmpq_poly_ptr to be a pointer to fmpq_poly_struct's.
The representation of a rational polynomial as the quotient of an integer polynomial and an integer denominator can be made canonical by demanding the numerator and denominator to be coprime and the denominator to be positive. As the only special case, we represent the zero function as . All arithmetic functions assume that the operands are in this canonical form, and canonicalize their result. If the numerator or denominator is modified individually, for example using the methods in the group Accessing numerator and denominator, it is the user's responsibility to canonicalize the rational function using the function fmpq_poly_canonicalize() if necessary.
All methods support aliasing of their inputs and outputs unless explicitly stated otherwise, subject to the following caveat. If different rational polynomials (as objects in memory, not necessarily in the mathematical sense) share some of the underlying integer polynomials or integers, the behaviour is undefined.
fmpq_poly_inv_series
fmpq_poly_div_series
_fmpq_poly_from_list
to fmpq_poly_from_list
static
to the underscore methods_
in the header from _FMPQ_POLY_H_
fmpq_poly_print
and fmpq_poly_print_pretty
NULL
returns of malloc
callsmalloc
_si
to _ui
test
fmpz_abs
in fmpq_poly_content()fmpz_abs