Data Structures | |
struct | fmpq_poly_struct |
Data type for a rational polynomial. More... | |
Typedefs | |
typedef fmpq_poly_struct | fmpq_poly_t [1] |
Array of fmpq_poly_struct of length one. | |
typedef fmpq_poly_struct * | fmpq_poly_ptr |
Pointer to fmpq_poly_struct. | |
Functions | |
void | fmpq_poly_canonicalize (fmpq_poly_ptr f, fmpz_t temp) |
Puts f into canonical form.This method ensures that the denominator is coprime to the content of the numerator polynomial, and that the denominator is positive. |
typedef fmpq_poly_struct* fmpq_poly_ptr |
Pointer to fmpq_poly_struct.
typedef fmpq_poly_struct fmpq_poly_t[1] |
Array of fmpq_poly_struct of length one.
This allows passing by reference without having to explicitly allocate memory for the structure, as one would have to when using pointers.
void fmpq_poly_canonicalize | ( | fmpq_poly_ptr | f, | |
fmpz_t | temp | |||
) |
Puts f
into canonical form.This method ensures that the denominator is coprime to the content of the numerator polynomial, and that the denominator is positive.
The optional parameter temp
is the temporary variable that this method would otherwise need to allocate. If temp
is provided as an initialized fmpz_t
, it is assumed without further checks that it is large enough. For example, max(f->num->limbs, fmpz_size(f->den))
limbs will certainly suffice.