      COMPLEX*16 FUNCTION CSDS(H1,H2,BETA)
C
C     THIS FUNCTION EVALUATES THE RATIOS OF SINE FUNCTIONS WHICH
C     APPEARS IN THE CROSS COUPLING INTEGRALS AND THE COMPLEX
C     DEPTH FUNCTIONS. IT IS DESIGNED SPECIFICALLY FOR THE CASE
C     WHEN HB*BETA HAS A LARGE IMAGINARY PART.
C
      IMPLICIT REAL*8 (A-H,O-Z)
      COMMON /BLKEVN/ HB,CW,CB,FKW,FKB,ROHW,ROHB,ATEN
C
      COMPLEX*16 BETA,CI,U,V,W,ARG1,ARG2
C
      CI=DCMPLX(0.0,1.0)
C
C     88.0D0 IS A MACHINE DEPENDENT CONSTANT, THE FOLLOWING LOGIC
C     ELIMINATES UNDERFLOW ERRORS.
C
      ARG1=BETA*2.0*(HB-H1)
      ARG2=BETA*2.0*(HB-H2)
C
      IF(DIMAG(ARG1) .GT. 88.0D0) THEN
      U=DCMPLX(1.0,0.0)
      ELSE
      U=1.0-CDEXP(CI*ARG1)
      END IF
C
      IF(DIMAG(ARG2) .GT. 88.0D0) THEN
      V=DCMPLX(1.0,0.0)
      ELSE
      V=1.0-CDEXP(CI*ARG2)
      END IF
C
      W=CDEXP(CI*BETA*(H1-H2))
      CSDS=W*U/V
C
      RETURN
      END
