#include #include #include unsigned sleep(unsigned seconds); double f(double x); void gridsearch(double x0, double x1, double tol, int N); // Driver program int main() { // Initial values double x0 =-3, x1 = 2; gridsearch(x0, x1,1e-5,1000000); return 0; } void gridsearch(double x0, double x1, double tol, int N) { int i; double x,dx,xhold; xhold=1e16; dx=(x1-x0)/N; for(i=0;i