subroutine jfcn(n, w, jf)
real(4) w(n), jf(n,n)

jf =0.
x =w(1); y =w(2)
if( n>=3) z=w(3)

! Test1:
!f(1)=x*x +y*y -5.
!f(2)=y -exp(x) -1.

! jacobian:
jf(1,1) =2*x; jf(1,2) =2*y
jf(2,1) =-exp(x); jf(2,2) =1

END
