]> www.ginac.de Git - ginac.git/blob - ginac/normal.h
- created AUTHORS and README files, updated INSTALL
[ginac.git] / ginac / normal.h
1 /** @file normal.h
2  *
3  *  Functions for polynomial quotient and remainder, GCD and LCM computation
4  *  and square-free factorization. */
5
6 #ifndef NORMAL_H
7 #define NORMAL_H
8
9 #include "ex.h"
10
11 class symbol;
12
13
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);
16
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);
19
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);
22
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);
25
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);
28
29 // Polynomial LCM in Z[X]
30 extern ex lcm(const ex &a, const ex &b, bool check_args = true);
31
32 // Square-free factorization of a polynomial a(x)
33 extern ex sqrfree(const ex &a, const symbol &x);
34
35 #endif