Commit 1dc110f0 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Changed print method and accurucy in ass5.

parent 6fb14c11
......@@ -4,7 +4,7 @@
#include "func_ptr.h"
#include "integral.h"
#define DX 1e-3
#define DX 1e-5
double f1(double x) {
return pow(M_E, -x);
......@@ -15,7 +15,7 @@ double f2(double x) {
}
#define PRINT_INTEGRAL(func, method, a, b) (printf(#func " from " #a " to " \
#b " using %-19s %.11f\n", #method " method:", integral(&func, &method, a, b, DX)))
#b " using %-19s %.11e\n", #method " method:", integral(&func, &method, a, b, DX)))
int main(void) {
PRINT_INTEGRAL(f1, rectangle, 0, 1);
......
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