3 * Functions for polynomial quotient and remainder, GCD and LCM computation
4 * and square-free factorization. */
14 // Quotient q(x) of polynomials a(x) and b(x) in Q[x], so that a(x)=b(x)*q(x)+r(x)
15 extern ex quo(const ex &a, const ex &b, const symbol &x, bool check_args = true);
17 // Remainder r(x) of polynomials a(x) and b(x) in Q[x], so that a(x)=b(x)*q(x)+r(x)
18 extern ex rem(const ex &a, const ex &b, const symbol &x, bool check_args = true);
20 // Pseudo-remainder of polynomials a(x) and b(x) in Z[x]
21 extern ex prem(const ex &a, const ex &b, const symbol &x, bool check_args = true);
23 // Exact polynomial division of a(X) by b(X) in Q[X] (quotient returned in q), returns false when exact division fails
24 extern bool divide(const ex &a, const ex &b, ex &q, bool check_args = true);
26 // Polynomial GCD in Z[X], cofactors are returned in ca and cb, if desired
27 extern ex gcd(const ex &a, const ex &b, ex *ca = NULL, ex *cb = NULL, bool check_args = true);
29 // Polynomial LCM in Z[X]
30 extern ex lcm(const ex &a, const ex &b, bool check_args = true);
32 // Square-free factorization of a polynomial a(x)
33 extern ex sqrfree(const ex &a, const symbol &x);