Skip to content

Commit

Permalink
Added chart
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuvince committed Mar 26, 2011
1 parent a3591b3 commit bd68bfd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Binary file added delta.pdf
Binary file not shown.
5 changes: 0 additions & 5 deletions tp3-2.c
Expand Up @@ -91,13 +91,8 @@ int main(int argc, char *argv[]) {

int M = atoi(argv[1]);


/*
printf("Méthode de Simpson : %f\n", Integrate(&f, START, END, M));
printf("Méthode des trapèzes: %f\n", IntegrateTrapezoid(&f, START, END, M));
*/

printf("%d, %f, %f\n", M, Integrate(&f, START, END, M), IntegrateTrapezoid(&f, START, END, M));

return EXIT_SUCCESS;
}
12 changes: 12 additions & 0 deletions tp3-2.csv
@@ -0,0 +1,12 @@
"M","Simpson","Trapèzes","Valeur exacte","M","Delta Simpson","Delta Trapèzes"
5,0.604541,0.606837,0.6046,5,0.000059,0.002237
10,0.604596,0.605156,0.6046,10,0.000004,0.000556
15,0.604599,0.604847,0.6046,15,0.000001,0.000247
20,0.6046,0.604739,0.6046,20,0,0.000139
25,0.6046,0.604689,0.6046,25,0,0.000089
30,0.6046,0.604662,0.6046,30,0,0.000062
35,0.6046,0.604645,0.6046,35,0,0.000045
40,0.6046,0.604635,0.6046,40,0,0.000035
45,0.6046,0.604627,0.6046,45,0,0.000027
50,0.6046,0.604622,0.6046,50,0,0.000022
55,0.6046,0.604618,0.6046,55,0,0.000018

0 comments on commit bd68bfd

Please sign in to comment.