home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Education
/
collectionofeducationcarat1997.iso
/
SCIENCE
/
GRAD.ZIP
/
FUNC2.FOR
< prev
next >
Wrap
Text File
|
1988-08-22
|
425b
|
17 lines
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