home *** CD-ROM | disk | FTP | other *** search
- function y = acosh(z)
- %ACOSH Inverse hyperbolic cosine.
- % ACOSH(X) is the inverse hyperbolic cosine of the elements of X.
-
- % Copyright (c) 1984-93 by The MathWorks, Inc.
-
- % Compute y = log(z + sqrt(z.^2 - 1)) without destructive overflow.
- s = max(1,max(abs(real(z)),abs(imag(z))));
- y = log(z + s.*sqrt((z./s).^2 - (1./s).^2));
-