If I compile your program from post #5 I get the following warnings:
Code:
$ gcc -Wall -Wextra -ggdb3 foo.c -lm
foo.c: In function ‘fun’:
foo.c:73:19: warning: unused parameter ‘x0’ [-Wunused-parameter]
foo.c: In function ‘main’:
foo.c:107:5: warning: passing argument 5 of ‘vrk4’ from incompatible pointer type [enabled by default]
foo.c:20:10: note: expected ‘void (*)(double, double *, double *)’ but argument is of type ‘double (*)(double, double *, double *)’
foo.c:112:5: warning: passing argument 5 of ‘vrk4’ from incompatible pointer type [enabled by default]
foo.c:20:10: note: expected ‘void (*)(double, double *, double *)’ but argument is of type ‘double (*)(double, double *, double *)’
foo.c:99:11: warning: unused variable ‘j’ [-Wunused-variable]
foo.c:99:9: warning: unused variable ‘p’ [-Wunused-variable]
foo.c:98:12: warning: unused variable ‘ss’ [-Wunused-variable]
foo.c:94:12: warning: unused variable ‘F’ [-Wunused-variable]
foo.c:135:1: warning: control reaches end of non-void function [-Wreturn-type]
foo.c: In function ‘fun’:
foo.c:81:1: warning: control reaches end of non-void function [-Wreturn-type]
You need to fix them before you can check whether your program produces a correct result or not.
Bye, Andreas