> <\body> The function computes the bounded degree factors, with multiplicity, of a lacunary (a.k.a. super-sparse) polynomial. Actually, three different implementations are given: the univariate case, the bivariate case, and the multivariate case (which can also be used with bivariate polynomials). The generic function simply choses the right implementation. The functions described below used as inputs and outputs elements of type ...\>, ...\> and ...\>. For more on the first two types, please refer to the documentation of |../../../multimix/doc/texmacs/index.en.tm>. For the third type, please refer to the documentation of |../../../factorix/doc/texmacs/index.en.tm>. The function takes as input a polynomial of type C,monomial\vector\E\ \ \> and a integer of type and outputs a vector of factors of type irreducible_factor\sparse_polynomial\...\ \ \>. It computes the irreducible factors of degree at most of . An example of use is as follows: <\cpp-code> #include \lacunaryx/bounded_degree_factors_univariate.hpp\ ... #define E integer // or int #define C integer // or rational #define Monomial monomial\ vector\E\ \ #define Sparse_polynomial sparse_polynomial\C, Monomial\ \; ... \; Sparse_polynomial x (1, Monomial (vec(1))); // defines the variable x Sparse_polynomial p= x*x*(x+1)*(x+1)*(x*x-2)*(2*x*x*x-x*x+3)*(x*x+x+1); string s="4356768657564355757856462587657634635"; integer e(s); p *= (1+3*binpow(x,1345) - 2*(x-4)*binpow(x,e)+(x*x*x-6)*binpow(x,2*e)); \; vector\ irreducible_factor\Sparse_polynomial\ \ v= \ \ bounded_degree_factors_univariate(p, 2);\ \ \ \ \ \ \ \ \ \ \ \ // [(x,2),(x+1,2),(x^2-2,1),(x^2+x+1,1)]\ \ \ \ \ \ \ \ \ \ \ \ // but not (2*x^3-x^2+3,1) since its degree is 3 \ 2. For bivariate polynomials, one may either use the function or the more general function presented in the next section. Instead of taking as input a as in the univariate case, takes as input a nat\> to be able to bound the degree in each variable independently. <\cpp-code> #include \lacunaryx/bounded_degree_factors_bivariate.hpp\ ... #define E integer // or int #define C integer // or rational #define Monomial monomial\ vector\E\ \ #define Sparse_polynomial sparse_polynomial\C, Monomial\ \; ... \; Sparse_polynomial x (1, Monomial (vec(1,0))); // defines the variable x Sparse_polynomial y (1, Monomial (vec(0,1))); // defines the variable y \; Sparse_polynomial p= x*x*y*(x-2)*(2*y+3)*(2*y+3)*(y-x*x*x+3)*(2*x+7*y*y*y); string s="4356768657564355757856462587657634635"; integer e(s); p *= (1 + 3*binpow(x,1345)*binpow(y,54334) - 2*(x-4*y)*binpow(x,e)*y*y + (x*x*x-6)*binpow(y,2*e)); \; vector\ irreducible_factor\Sparse_polynomial\ \ v= \ \ bounded_degree_factors_bivariate(p, vec(3,2));\ \ \ \ \ \ \ \ \ \ \ \ // [(x,2),(y,1),(x-2,1),(2*y+3,2),(y-x^3+3,1)] \ \ \ \ \ \ \ \ \ \ \ // but not (2*x+7*y^3,1) since its y-degree is 3 \ 2. For multivariate polynomials, we rely on the facility provided by the type ...\> of . Thus, the function takes as input a polynomial of type Sparse_polynomial\> where is defined as in the univariate and bivariate cases. The output is a vector of type irreducible_factor\multivariate\Sparse_polynomial\ \ \>. As for the bivariate case, the bound on the degree of the computed factors is given as a nat\>. <\cpp-code> #include \lacunaryx/bounded_degree_factors_multivariate.hpp\ ... #define E integer // or int #define C integer // or rational #define Monomial monomial\ vector\E\ \ #define Sparse_polynomial sparse_polynomial\C, Monomial\ #define Multivariate_polynomial multivariate\Sparse_polynomial\ \; ... \; Monomial mx (multivariate_coordinate\<\> ("x")); Monomial my (multivariate_coordinate\<\> ("y")); Monomial mz (multivariate_coordinate\<\> ("z")); Multivariate_polynomial x, y, z, p; \; x= Multivariate_polynomial (C(1), mx); // defines the variable x y= Multivariate_polynomial (C(1), my); // defines the variable y z= Multivariate_polynomial (C(1), mz); // defines the variable z \; p= x * y*y * z*z*z*z; p*= 1 - binpow (y, 1000); p*= x*x*x*x*x*x - 3 * x*x*x*x * y * z*z + 7 * y*y*y * z*z*z;\ \ \ // x^6 - 3*x^4*y*z^2 + 7*y^3*z^3 p*= 2 * y*y * x*x*x*x*x*x + 7 * y *z*z \ + 3 * x*x*x*x * z; \ \ // 2*x^6*y^2 + 7*y*z^2 + 3*x^4*z \; \; \; vector\ irreducible_factor\Multivariate_polynomial\ \ v= \ \ bounded_degree_factors_multivariate(p, vec(6,3,2));\ \ \ // [(x,1),(y,2),(z,4),(y-1,1),(y+1,1),(y^2+1,1),(2x^6y^2 + 7yz^2 + 3x^4z,1)] \ \ // but not x^6 - 3*x^4*y*z^2 + 7*y^3*z^3 since its z-degree is 3 \ 2. These functions have not been glued for use in yet. Only the computations of linear factors are available. . If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.> <\initial> <\collection>