      complex function ccos (z)
c april 1977 version.  w. fullerton, c3, los alamos scientific lab.
      complex z
      external cos, cosh, sin, sinh
c
      x = real (z)
      y = aimag (z)
c
      cs = cos(x)
      call erroff
c
      ccos = cmplx (cs*cosh(y), -sin(x)*sinh(y))
c
      return
      end