[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
5.7.5 Unit, content and primitive part
The methods
ex ex::unit(const ex & x); ex ex::content(const ex & x); ex ex::primpart(const ex & x); ex ex::primpart(const ex & x, const ex & c); |
return the unit part, content part, and primitive polynomial of a multivariate
polynomial with respect to the variable ‘x’ (the unit part being the sign
of the leading coefficient, the content part being the GCD of the coefficients,
and the primitive polynomial being the input polynomial divided by the unit and
content parts). The second variant of primpart()
expects the previously
calculated content part of the polynomial in c
, which enables it to
work faster in the case where the content part has already been computed. The
product of unit, content, and primitive part is the original polynomial.
Additionally, the method
void ex::unitcontprim(const ex & x, ex & u, ex & c, ex & p); |
computes the unit, content, and primitive parts in one go, returning them
in u
, c
, and p
, respectively.