****************************** Solution G ****************************** Tprime,lab: 0.000s Tgauss,lab: 0.004s Tprime,grendel: 0.001s Tgauss,grendel: 0.004s Tprime,ozark: 0.002s Tgauss,ozark: 0.007s Tprime,grendel / Tprime,lab: 0 Tprime,ozark / Tprime,lab: 0 Tgauss,grendel / Tgauss,lab: 1 Tgauss,ozark / Tgauss,lab: 1.75 To obtain my meausrements I used the Unix command time. This command returns three unique time stamps, but for my results I solely looked at the user time. The user time measures the amount of CPU time it takes for the program to run through all of it's included instructions. Below are the terminal instructions I used for each individual test case: Tprime,lab terminal instructions: gcc primetesting.c time ./a.out 33880 Tprime,grendel terminal instructions: ssh grendel (entered password) gcc primetesting.c time ./a.out 33880 Tprime,ozark terminal instructions: ssh ozark (entered password) cd www gcc primetesting.c time ./a.out 33880 Tgauss,lab terminal instructions: gcc gaussian.c -lm time ./a.out 33880 Tgauss,grendel terminal instructions: ssh grendel (entered password) gcc gaussian.c -lm time ./a.out 33880 Tgauss,ozark terminal instructions: ssh ozark (entered password) cd www gcc gaussian.c -lm time ./a.out 33880 Appendix: primetesting.c: #include int main() { int n; int d = 2; printf("Please enter a number: \n"); scanf("%d",&n); while((d*d) < n) { if((n % d) == 0) { printf("even\n"); return 0; } d += 1; } printf("prime\n"); return 1; } gaussian.c: #include #include int main() { double n; int i; double answer; double f(double x) { double dx = (-(x * x)) / 2; double function = exp(dx); return function; } printf("Please enter a number: \n"); scanf("%lf", &n); double sum = f(-2) + f(2); int d= 4; double delta = d/n; printf("n is equal to: %f\n", n); printf("f(-2) = %f and f(2) = %f \n", f(-2), f(2)); printf("sum is: %f\n", sum); printf("d is equal to: %d\n", d); printf("delta is: %f\n", d/n); for(i = 1; i <=(n-1); i++) { //for i from 1 to n-1, inclusive sum = sum + 3 * f(-2+i*delta); } printf("sum divided by 3 is: %f\n", sum/3); answer = delta *(sum/3); printf("%f \n", answer); return; }