#include <iostream>
#include "wielomian.h"
#include <sstream>

using namespace std;

int main(int argc, char *argv[])
{

	double wsp[]={ 1,2,3 , 4, 5};
	Wielomian w1(wsp,2);
	Wielomian w2;
	w2=w1;
	cout << "Wielomian w1  : " << w1 << endl << "Wielomian w2  : " << w2 << endl;

	stringstream ss;
	ss << "2 3.0 2.0 1.0" ;
	Wielomian w3;
	ss >> w3;

	
	cout << "Wielomian w3  : " << w3 << endl;
	cout << "w1 + w2 = " << w1 + w2 << endl;

	cout << "Wielomian w3  : " << w3 << endl;
	cout << "[w1 + w2] " << w1 + w2 << endl;
	cout << "[w1+=w2] " << (w1+=w2) << endl;
	cout << "[w1 * w2] " << (w1 * w2) << endl;
	cout << "[w1*=w2] " << (w1*=w2) << endl;
	cout << "[w1==w2] " << (w1==w2) << endl;
	cout << "[w1==w1] " << (w1==w1) << endl;
	cout << "[w1 * 3] " << (w1*3) << endl;
	cout << "[w1 - w2] " << (w1-w2) << endl;
	cout << "(Wielomian)3.14 " << (Wielomian)3.14 << endl;
	cout << "w1(3.14)  = " << w1(3.14) << endl;
	cout << "w1(1)  = " << w1(1) << endl;


	for(int i=1; i< 7;i++)
	{
		cout << "Pochodzna w1 " << i << " stopnia : ";
		w1.Pochodna(i).Wyswietl();
	}

	for(int i=1; i< 7;i++)
	{
		w1=*w1;
		cout << "Pochodzna w1 " << i << " stopnia : " << w1 << endl;
	}
	
//	Wielomian w4=w2+w2;
//	cout << "Wielomian w3+w2        : ";
//	w4.Wyswietl();

	return 0;

}
