//!creates one .txt file with the Points a spline function shall be constructed for and one with the cooeficients, this programm has computes. A third contains the coefficenc of the derivate. All can be read by the SplineTest.m into MATLAB.
std::cout<<"ERROR: The deviation of x^2+x+1 should be 2x + 1 But the new polyonom has "<<myPoly3.NumCoefficients()<<" coefficients: "<<myPoly3.Coefficients()[0]<<" * x + "<<myPoly3.Coefficients()[1];
std::cout<<std::endl<<std::endl;
//exceptions for Piecewise Polynoms
std::cout<<"Testing the Value function with Argument out of it's range, without extrapolation:"<<std::endl;
boolok=false;
try{myPoly2.Value(float(-2));}
catch(ITAException&err){
std::cout<<err<<std::endl;
ok=true;
std::cout<<err;
}
if(!ok)
std::cout<<"ERROR: Expected throw of exception";
std::cout<<std::endl<<std::endl;
std::cout<<"Testing the Value function with Arguments out of it's range, with extrapolation:"<<std::endl;
std::cout<<"At -2, the calculated value should be -1: "<<myPoly2.Value(float(-2),true)<<std::endl;
std::cout<<"At 2, the calculated value should be 6: "<<myPoly2.Value(float(2),true)<<std::endl;
std::cout<<std::endl;
//exceptions for spline
std::cout<<"Testing spline with to few Points:"<<std::endl;
std::cout<<"Testing spline with too few Points:"<<std::endl;