#include <iostream>
#include <cmath>
#include "assign4.h"
using namespace std;
/** newton *********************************************************
*
* @params - x -- an estimation of the square root of a number
* tol -- a tolerance that should be greater than the absolute value of the difference between an estimation and the previous estimation.
* maxIt -- the maximum number of iterations computed before a final estimation is found.
* @pre - x>=0
*
* @returns an estimated square root of a number.
* **************************************************************************/
double newton(double x, double tol, int maxIt);
int main () {
double squareRoot;
squareRoot = newton(-1.5,0.0001,10);
cout << "The square root of f(x) = x2e-x-2 is approximately " << squareRoot;
return 0;
}