** Next:** Evaluation of a polynomial
** Up:** Utilities
** Previous:** Addition of two polynomials
** Contents**

##

Multiplication of two polynomials

The following procedures returns the degree of the product
of two polynomial either with real or integer coefficients:

int Degree_Product_Polynomial_Interval(int n1,VECTOR &Coeff1,int n2,VECTOR &Coeff2);
int Degree_Product_Polynomial_Interval(int n1,INTEGER_VECTOR &Coeff1,int n2,
INTEGER_VECTOR &Coeff2);

Then you may use the following procedure to compute the product of
polynomial either with real,integer or interval coefficients:
VECTOR Multiply_Polynomial_Interval(int n1,VECTOR &Coeff1,int n2,VECTOR &Coeff2);
INTEGER_VECTOR Multiply_Polynomial_Interval(int n1,INTEGER_VECTOR &Coeff1,
int n2,INTEGER_VECTOR &Coeff2);
INTERVAL_VECTOR Multiply_Polynomial_Interval(int n1,INTERVAL_VECTOR &Coeff1,
int n2,INTERVAL_VECTOR &Coeff2);

All these procedures return the coefficients of the product, the
leading term being 0 only if one polynomial is equal to 0.
To take into account the rounding errors you may use:

INTERVAL_VECTOR Multiply_Polynomial_Safe_Interval(int n1,VECTOR &Coeff1,int n2,VECTOR &Coeff2);

Jean-Pierre Merlet
2012-12-20