      FUNCTION KF(RK,ARG)
C
C     * FUNCTION CALLED BY GWLOOKU 
C     * USED TO EVALUATE INCOMPLETE ELLIPTIC INTEGRALS
C     * BASED ON ELLF OF NUMERICAL RECIPES
C
C     * MAR 24/99 J SCINOCCA
C
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)
      REAL RK,ARG,KF
      REAL X,Y,Z,RKSQ

      EXTERNAL RF
C
      RKSQ=RK**2

      X=COS(ARG)**2
      Y=1.E0-RKSQ*SIN(ARG)**2
      Z=1.E0

      KF=SIN(ARG)*RF(X,Y,Z)

      RETURN
      END
