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

  1. function y = asinh(z)
  2. %ASINH    Inverse hyperbolic sine.
  3. %    ASINH(X) is the inverse hyperbolic sine 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.