/********************************/ /* Integration */ /* Attempting to integrate */ /* exp(-x*x) over all space */ /* */ /* Jon Franklin 09-24-2001 */ /********************************/ #include #include #define MAX 99999 /* function testf inputs: h = step size f[] = array of function values outputs: returns sum(f)*h This function also prints lots of crap to the terminal. You can turn on debugging by uncommenting the DEBUG lines below. */ double testf(double h, double f[]) { int i; double x; x=0.0; /* DEBUGGING */ /* printf(" x=%g \n",x); */ for(i=0;i