subroutine fcn8(n, w, f8)
implicit real(8) (a-h, o-z)

real(8) w(n),f8(n)

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

! Test1:
		f8(1) =x*x +y*y -5.d0
	f8(2) =y -dexp(x) -1.d0

!18-III
!f(1) =x+y+z*z-3.8
!f(2) =x*y*z+1.9
!f(3) =sqrt(x)+sqrt(y)-z*z-1.3

! 19/I E: (2,1,-1)
!f(1) =x*x ++y*y +z*z-6.4
!f(2) =x*y*z +2.2
!f(3) =x +y-z*z-2.4

! Miel (1980):
!Fx = (2r3 - s2 - 1, rs3 - s - 4) = 0, x = (r, s).
!1.234 274 484; 1.661 526 467
!f8(1) =2*x*x*x -y*y -1
!f8(2) =x*y*y*y -y -4

! Vahidi 2012:(0.5,0,-pi/6)
!f(1) =3*x1 -cos(x2*x3)- 0.5
!f(2) =x1*x1 -81*(x2 + 0.1)**2 +sin(x3) + 1.06
!f(3) =exp(-x1*x2) + 20*x3 + (10*pi-3)/3

!x1 =w(1); x2 =w(2); x3 =w(3);x4 =w(4);
!pi =2*dasin(1.d0)
!f8(1) =3*x1 -dcos(x2*x3)- 0.5
!f8(2) =x1*x1 -81*(x2 + 0.1)**2 +dsin(x3) + 1.06
!f8(3) =dexp(-x1*x2) + 20*x3 + (10*pi-3)/3.

! Powell Badly Scaled Function
! x* = (1.098...10?5, 9.106...), (9.106..., 1.098...10?5 )
! Initial: 2;3 => div.;     0.,9;

!f8(1) =1D4*x*y -1
!f8(2) =dexp(-x) +dexp(-y) -1.0001
END
