3 integer,
parameter :: rk = kind(1.0d0)
4 integer,
intent(in) :: n
5 real(kind=rk),
dimension(n),
intent(in) :: x
6 real(kind=rk),
dimension(n),
intent(out) :: g
8 g(1) = 200*(x(2) - x(1)**2)*(-2*x(1)) - 2*(1 - x(1))
9 g(2) = 200*(x(2) - x(1)**2)
subroutine objective_gradient(n, x, g)