      SUBROUTINE FP (X, Y, Z, F)
C == Fletcher and Powell, 1963 ==
      IMPLICIT REAL*8 (A-H,O-Z)
      PI = 3.14159
      PI2 = 2 * PI
      R = DSQRT(X*X + Y*Y)
      IF (X .LT. 0) GO TO 10
        THETA = DATAN(Y / X) / PI2
        GO TO 20
   10 CONTINUE
        THETA = (PI + DATAN(Y / X)) / PI2
   20 CONTINUE
      F = 100. * ((Z - 10 * THETA)**2 + 
     :    (R - 1)**2) + Z*Z
      RETURN
      END
