Skip to content
Snippets Groups Projects
Commit 22d2ddd5 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Fixed compiler error about missing header file.

parent d431e629
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,11 @@ double simpson(func_ptr f, double a, double b) {
}
double gauss(func_ptr f, double a, double b) {
return 0;
double s = (b - a) / sqrt(3),
// calculate abscissae
left = (b + a - s) / 2.0,
right = (b + a + s) / 2.0;
return (b - a) * (f(left) + f(right)) / 2.0;
}
double integral(func_ptr f, method_ptr method, double a, double b) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment