subroutine func(x, fx, dfx) c c -- the solution to f(x) = sin(x) - x/10 c real x, fx, dfx c fx = sin(x) - 0.1 * x dfx = cos(x) - 0.1 return end