home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / ELFUN.DI$ / ACOSH.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  336 b   |  10 lines

  1. function y = acosh(z)
  2. %ACOSH    Inverse hyperbolic cosine.
  3. %    ACOSH(X) is the inverse hyperbolic cosine of the elements of X.
  4.  
  5. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  6.  
  7. % Compute y = log(z + sqrt(z.^2 - 1)) without destructive overflow.
  8. s = max(1,max(abs(real(z)),abs(imag(z))));
  9. y = log(z + s.*sqrt((z./s).^2 - (1./s).^2));
  10.