// ***************************************** //
// Dot Product //
// ***************************************** //
FLOAT FLOAT_POLY::inner_product(FLOAT a,FLOAT b,FLOAT_POLY& P)
{
FLOAT value;
if(P.head==NULL && head!=NULL){
//the incoming polynomial is degenerate
value = 0;
return(value);
}
if(P.head!=NULL && head==NULL){
//this is NULL
value = 0;
return(value);
}
if(P.head==NULL && head==NULL){
//both are NULL
value = 0;
return(value);
}
if(P.head!=NULL && head!=NULL){
//both are non NULL
FLOAT_POLY R = P*(*this);
value = R.definite_integral(a,b);
return(value);
}
}