function y = asinh(z)
%ASINH	Inverse hyperbolic sine.
%	ASINH(X) is the inverse hyperbolic sine of the elements of X.

%	Copyright (c) 1984-94 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));
