      SUBROUTINE GX (ZZ,RH,XK,GZ,GZP)
C     SEGMENT END CONTRIBUTIONS FOR THIN WIRE APPROX.
      COMPLEX GZ,GZP
      R2=ZZ*ZZ+RH*RH
      R=SQRT(R2)
      RK=XK*R
      GZ=CMPLX(COS(RK),-SIN(RK))/R
      GZP=-CMPLX(1.,RK)*GZ/R2
      RETURN
      END