Fixed compiler error about missing header file.

parent d431e629
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment