acosh.f 433 Bytes
function acosh (x)
c april 1977 edition.  w. fullerton, c3, los alamos scientific lab.
      external  r1machsqrt
      data aln2 / 0.6931471805 5994530942e0/
      data xmax /0./
c
      if (xmax.eq.0.) xmax = 1.0/sqrt(r1mach(3))
c
      if (x.lt.1.0) call seteru (21hacosh   x less than 1, 21, 1, 2)
c
      if (x.lt.xmax) acosh = alog (x + sqrt(x*x-1.0))
      if (x.ge.xmax) acosh = aln2 + alog(x)
c
      return
      end